The following is meant to supplement not supplant existing answers. In general, you look at what it was in Latin; however, there are several prominent exceptions.
The Etymonline entry regarding this is cribbed and abbreviated from the OED. Here’s what the OED says about these.
‑ance and ‑ence
‑ance
a. Fr. ‑ance :– L. ‑ānt‑ia, ‑ēnt‑ia, ‑ent‑ia
(see ‑ence), all of which in words that survived into Fr., or were
formed in Fr. as nouns of action, on the pres. pple., were levelled under
‑ance. But other L. words of this form, subseq. adopted in Fr., took
‑ence or ‑ance, according to L. spelling. Thus of popular preservation
or formation, aidance, assistance, complaisance, nuisance,
parlance, séance; of later learned adoption from L., absence,
clémence, différence, diligence, providence, prudence, as well as
élégance, tempérance. Words of both classes were adopted in Eng. in
their actual Fr. forms, which they still generally retain. But, since 1500,
various words orig. in ‑ance from Fr. have been altered back to ‑ence,
after L.; and all words recently adopted from L., directly or through
mod.Fr., or formed on L. analogies, have taken ‑ence or ‑ance according
to the L. vowel. Hence, mod.E. words in ‑ance partly represent L.
‑āntia, but largely L. ‑entia, ‑ēntia, through OFr. ‑ance; partly
also mod.Fr. ‑ance from vbs. of various origin. On the other hand, OFr.
‑ance :– L. ‑entia, ‑ēntia, is, in consequence of refashioning,
partly represented by Eng. ‑ence. For the confusion and inconsistency
which this causes in current spelling, as in dependance, ‑dence,
resistance, subsistence, see ‑ence. As, in many cases, the OFr.
vbs. themselves, as well as their derivatives in ‑ance, were adopted in
Eng. (e.g. appear ‑ance, assist ‑ance, purvey ‑ance, suffer ‑ance),
the suffix became to a certain extent a living formative, and was occas.
used to form similar nouns of action on native vbs., as abid‑ance,
abear‑ance, forbear‑ance, further‑ance, hinder‑ance, ridd‑ance,
etc. For meaning, see ‑ence; and cf. ‑ancy.
‑ence
a. Fr. ‑ence, ad. L. ‑entia, forming abstr. sbs., usually of
quality, rarely of action, on ppl. stems in ‑ent‑, e.g. sapient‑em
knowing, sapient‑ia knowingness, sapience; audient‑em hearing,
audient‑ia the process of hearing, audience. As the ppl. stem had
‑ent‑, ‑ant‑, the derivative sbs. had ‑entia (prūdentia), ‑antia
(īnfantia); but all these were levelled in OFr. to ‑ance, in words that
survived in popular use, or were formed analogically on the pr. pple. in
‑ant; as aidance, assistance, complaisance, contenance,
nuisance, parlance, séance. These were sbs. of action or process, the
value with which the suffix was retained in Fr. as a living formative. But
subsequently other L. words in ‑ntia, which had not survived in the
living language, were readopted on the analogy of these, but with ‑ence
or ‑ance according to the L. vowel, e.g. absence, clémence,
diligence, élégance, présence, providence, prudence,
tempérance, violence. These were sbs. of quality or state; all Fr.
words in ‑ence are of this class. Both classes were adodpted in ME. in
their actual Fr. forms and senses, which they generally still retain; but
since 1500, some of those in ‑ance have been altered back to ‑ence
after L. All words since adopted from or formed on L., follow L. precedent
as to ‑ence or ‑ance. The result is that the modern spelling of
individual words, and still more of groups of cogn. words, is uncertain and
discordant; cf. assistance, consistence, existence, resistance,
subsistence; attendance, superintendence; ascendant, ‑ent,
‑ancy, ‑ency, condescendence; dependant, ‑ent, ‑ance, ‑ence,
independence; appearance, apparent; pertinence, appurtenance. In
sense, words in ‑nce are partly nouns of action, as in OFr., partly of
state or quality, as in L. The latter idea is more distinctly expressed by
the variant ‑ncy (see ‑y = ‑ie :– ‑ia) which has been formed in
Eng. as a direct adaptation of L. ‑ntia; see ‑ency, ‑ancy.
‑ant and ‑ent
‑ant
a. Fr. ‑ant, sometimes :– L. ‑entem, ‑āntem, ‑ēntem, ending of
pres. pple. (see ‑ent); sometimes a later adaptation of ‑āntem only.
All the participial forms were in OFr. levelled under ‑ant, the sole
ending of the pr. pple., as L. amānt‑, vidēnt‑, sedēnt‑,
crēdent‑em in Fr. amant, voyant, séant, croyant. But other words
were subsequently adopted in their L. stem form, as prudent, présent,
élégant. Hence Fr. words in ‑ant are of two kinds, one answering to L.
‑ānt, the other to L. ‑ent, ‑ēnt. All were adopted, in their actual
Fr. forms, in Eng., where they subseq. became ‑ˈau.nt; then again, with
the change of stress, ‑ant, as L. affīdent‑em, diffī‑dent‑em,
plicānt‑em, servient‑em, tenēnt‑em, OFr. afiant, defiant,
pliant, serjeant, tenant, ME. afiˈa(u).nt, defiˈa(u).nt,
pliˈa(u).nt, serjeˈau.nt, teˈnau.nt. Most of them retain ‑ant,
e.g. claimant, pleasant, poursuivant, servant, suppliant,
valiant; but since 1500 some have been refashioned with ‑ent after L.,
wholly (as apparaunt, ‑ent), or partly (as in pendant, ‑ent,
dependant, ‑ent, ascendant, ‑ent). Hence, inconsistency and
uncertainty in the present spelling of many words, in which L. and Fr.
analogies are at variance: see ‑ent. Many new words of this class have
been adopted from L. ‑āntem directly or through later Fr., or have been
formed on L. analogies, or adopted from mod.Fr. and Romance ‑ant,
‑ante; as concomitant, protestant, commandant, anæsthesiant. For
sense, see ‑ent.
‑ent
a. Fr. ‑ent, ad. L. ‑ent‑em, the ending of pr. pples. of vbs. of the
2nd, 3rd, and 4th conjugation, as rīdent‑em, currentem, audientem.
(In the pples. of the 3rd and 4th conjugation this ending represents OAryan
‑nt‑, or perh. ‑ent‑, of the ablaut‑series ‑ent‑, ‑ont‑, ‑nt‑;
cf. Skr. ‑ant‑, ‑at‑, Gr. ‑οντ‑, Goth. ‑and‑, OE. ‑end‑; in those
of the 2nd conjugation it represents this suffix combined with the thematic
‑e‑ of the vb.; similarly the ‑ant‑ of the 1st conjugation includes a
thematic ‑a‑.) In OFr. this suffix and the corresponding ‑ant‑em of the
1st conjugation were levelled under ‑ant, the sole ending of the Fr. pr.
pple., as riant, courant, mourant, levant ( :– L. levantem). At a
later time many L. forms in ‑ent‑, which had acquired an adj. sense,
were adopted in Fr. as adjs. with the ‑ent‑ unchanged, as diligent,
évident; some of these were duplicates of living ppl. forms in ‑ant, as
convénient = convenant, provident = pourvoyant, confident
= confiant. The Fr. words in ‑ant, ‑ent, which were adopted into
Eng., have generally retained the form of the suffix which they had in Fr.;
but since 1500 there has been a tendency to refashion them after Lat., and
hence several words in ‑ant have changed that ending for ‑ent, either
entirely or in certain senses. In mod.Eng. also many Lat. words in ‑entem
have been directly adopted, always in the form ‑ent. The conflict between
Eng. and Fr. analogies occasions frequent inconsistency and uncertainty in
the present spelling of words with this suffix; cf. e.g. assistant,
persistent; attendant, superintendent; dependant, ‑ent,
independent.
- In sense the words in ‑ent, ‑ant are primarily adjs., sometimes
distinctly ppl., as convergent, obsolescent, errant, peccant; some,
however, are, like many words of the same type in Lat. and Fr., used as
sbs. (either in addition to the adj. use or exclusively), meaning (a) a
personal agent, as agent, claimant, president, regent; (b) a
material agent, as coefficient, current, ingredient, secant,
tangent, torrent; esp. in Medicine, as aperient, astringent,
emollient, expectorant.