Why does the word ‘suffix’ have a double ‘ff’ while ‘prefix’ has a single ‘f’?
Solution 1:
These words are 'borrowed' from Latin, which routinely performed elision and assimilation on prefixes with a final consonant when the consonant was sufficiently similar to the initial consonant of the root to which it was attached. The resulting word was spelled with a doubling of the remaining consonant.
pre- + fix- ... no final consonant, so prefix
sub- + fix- ... so suffix
ad- + fix- ... affixin- + toler- ... {n} and {t} are very high contrast, so intolerant
in- + med- ... immediate
in- + lum- ... illuminateThe same pattern is followed with modern coinages using Latin prefixes and roots.
(From English Language and Learners SE by StoneyB)
Solution 2:
Two ways you can explain it are from the word's etymology, and from the word's pronunciation in English. Etymology is the historical reason. The English pronunciation is not the original cause of the spelling, but if you remember the pronunciation, it might help you to remember the spelling.
Etymological explanation
The etymological reason is that, as mentioned in the comments, the Latin source of suffix (the verb suffigere) has double ff, but the Latin source of prefix (the verb praefigere) has single f.
The Latin verb suffigere was formed with the prefix sub-, which in its basic form ends in the consonant b. However, Latin has rules that cause consonants at the ends of certain prefixes to merge with the following consonant to form a double consonant in some circumstances. In the case of sub-, the b is turned into f before a base starting in the consonant f (this is called “assimilation”), creating a double ff.
The Latin verb praefigere was formed with the prefix prae-, which does not end in a consonant, so there was no doubling in Latin.
An alternative explanation from English pronunciation
In English, a vowel before a double consonant tends to be pronounced “short”. You can see that suffix is pronounced with a “short u” sound in the first syllable, which is consistent with the spelling with double ff (although it does not require it: there are prefixed words such as suburb where the u is pronounced short despite not being followed by a double consonant).
In contrast, prefix is pronounced with a “long e” sound in the first syllable. It would be fairly irregular if a word with this pronunciation were spelled with double ff after the e.