I am curious what could have caused the shift in pronunciation. I presume it must have occurred after the spelling of words was standardized. According to the History of French wikipedia article, this happened in the transition to Middle French around 1500 and to Early Modern French around 1700.
Word final consonants in French are pronounced, but only under certain conditions that has to do with group- or phrase phonology; they are usually not pronounced at the end of a phrase or a word uttered in isolation.
Descriptions of late 17th century French suggest a stage where most consonants were (still) pronounced, but some were elided mainly before other consonants. These elisions eliminated some consonant clusters inside word groups.
Word-final consonants are pronounced when the next word starts in a vowel in certain groups, the phenomenon known as liaison.
Liaison is considered obligatory within some groups, eg between article and adjective/noun
- les enfants /lez‿ɑ̃.fɑ̃/
between subject/object pronoun and verb (or verb followed by subject/object pronoun)
- nous avons /nu.z‿a.vɔ̃/
but not between phrases, eg between a subject noun and verb
- Mes amis arrivent /me.z‿a.mi (*.z‿) a.ʁiv/
Late 17th Century French
Contemporary descriptions of 'good' pronunciation emphasize cases when word final consonants are elided and not pronounced, i.e. the reverse of modern descriptions.
An example from L'art de prononcer parfaitement la langue françoise (1689).
"il fait, on lit, vous dites, les mains, vos parens, qu'on prononce à peu près comme s'il y avoit, ifai, onli, voudite, lémains, vauparans." (p 101)
Like in modern French in these examples the final consonant of a pronoun/article before another consonant was not pronounced, but (group) final -s had not yet been generally dropped:
le(s) mains, vo(s) parens
Like in modern French (group) final -t in these examples was dropped, and unlike the 'l' of il is also elided before a consonant.
These examples suggest that consontants were elided first inside specific word groups to simplify clusters, eg from |vousdites > voudites|, |ilfait > ifait|, before they were elided anywhere else. Most of these elisions also apply for modern French, but some have been reversed like in the case of 'il fait.'
Compare La Génie de la langue françoise (1684) which has this to say about word final -f:
- F is always pronounced in
"..Bref, chef, fief, grief, nef, esquif, if, arbre; Iuif, motif, naïf, tarif, vif: nominatif, genetif, &c, indicatif, subjonctif, &c, neuf, de novus." [p20]
- F is only pronounced before vowels, and at the end of a line of verse or phrase (period) in these words:
"..bœuf, œuf, neuf, de novem. On dit un œu dure; du bœu salé; neu soldats". [p20]
So at this point in time for some words the -f was never elided, but for some it was elided but only before consonant in the same group, 'bœuf' (beef) but 'bœusalé' (salted beef), 'neuf' (nine) but 'neusoldats' (nine soldiers).
- F is not pronouced before plural s
"Au pluriel on prononce toûjours des grièz, du singulier grief: & des bœus".
Interestingly most of the words the first group - where -f is never elided - are adjectives, and would most commonly occurs as the final word in their group. The elisions in the second group are not current in modern French, but some elisions before plural are, 17 Cent 'bœus' for "bœufs" is today 'bœu' since plural -s is now generally dropped.
Weakening of consonants (typically stops > fricatives > approximants > nothing) is a process which has affected many languages at many times. It's particularly noticeable in French because, as you say, the orthography predates the change; but the same is true for certain patterns in English (most words that contain 'gh', for example, and for non-rhotic accents such as most dialects of England, 'r' after a vowel).
What is slightly unusual in French is that final consonants have often been lost except where followed by a vowel - it's much more common to find consonants lost between vowels, and indeed this happened in French earlier, eg Lat. credere > Fr. croire. But the fact that the process has mostly affected only word-final consonants means that it is a different process.
Your question's a bit ambiguous: you could be asking about silent consonants which do exist in the writing but are never pronounced, or those that are there but pronounced only depending on what sound follows (i.e. next word's initial sound).
In the 1st case it's because French orthography is veeery conservative, in some regards even more than that of English, so it retains spellings closer to Latin even if nobody speaks like that anymore, like "est": nobody has pronounced that "s" in more than one thousand years.
The 2nd case is a type of sandhi, "t" in "est" does have a sound in "est-il" but is silent in "est rien".
The Five Faces of Language Change
1. Sound Change: Defining Deviance Downward
Much of the difference between the Latin and the French sentences is due to the fact that in all languages, there is a strong tendency for sounds to erode and disappear over time, especially when the accent does not fall upon them. This is part of what transformed femina "woman" in the Latin sentence into femme in the French one, which is pronounced simply "FAHM." The first syllable of femina was accented -- "FEH-mee-nah"; the other two were not, and over time they weakened and dropped off completely. In real time, we process this kind of erosion as sloppy: to us, Jeet yet? is a barefoot version of Did you eat yet?, as inevitable but formally unsavory as an unmade bed. But this very process was part of what turned Latin into French, and not "sloppy" French but the toniest formal French.
Sounds do not vanish in a heartbeat; at first, there is just a tendency to pronounce the sound less distinctly in casual, running speech. What follows is a kind of analogue of "defining deviance downward," a societal trend in which the gradual acceptance of behaviors once considered taboo has the effect of rendering behaviors of the next level of extremity easier to contemplate and fall into ("If smoking pot is no big deal, then why not...?").
A generation that grows up hearing the sound produced less distinctly most of the time gradually comes to take this lesser rendition of the sound as the "default." Meanwhile, however, they, too, follow the general and eternal tendency to pronounce unaccented sounds less distinctly and thus pronounce their "default" version of the sound, already less distinct than the last generation's, even less distinctly. The next generation takes this muffled sound as "default"; but when they in turn follow the natural tendency to pronounce this sound even less distinctly much of the time, this time there is so little left of the sound that to muffle it is to eliminate it completely. Thus, for them, the choice is between making the sound at all and leaving it off completely. Finally comes a generation for whom the "default" is no sound in that position at all.
This erosion has a particularly dramatic effect in that, whereas some sounds in a word serve no particular purpose (the -ina of fem-ina), other sounds are part of suffixes or prefixes that perform important grammatical functions. For example, think of the -ed that marks past in English; without this suffix, one does not know from the word whether walked is present or past at all. The erosion of prefixes and suffixes like these was particularly central in turning the Latin sentence into the French one. There is a certain tendency for sound change to "go easy on" these prefixes and suffixes to preserve important aspects of the language's machinery. But this is only a tendency, and just as often sound change wreaks its termite-like destruction even on the support beams of a grammar.