Consider the th in thistle versus the th in this: the former is unvoiced, while the latter is voiced.
Is there a rule or reason for the differences?
The rule that Peter pointed out in comments is that it is voiced only in function words, not in others. (In fact, this is more of a law than a rule really, because it has no exception in English.)
The complete list, excluding derived terms based on words in this list, is:
than, that, the, thee, their, them, then, thence, there, these, they, thilk1, thine, this, thither, those, thou, though, thus, thy, thyne, thyself.
Notice how those are all function words of one sort or another, not nouns or verbs.
Note that English also has a few words that begin with th where the h is silent, like Thomas and Thames. Those you just have to learn by rote. There are not very many of them, but they can be quite common.
The second part of the question asks whether there is a reason for these differences. We don’t know for sure, but function words tend not to be stressed, which tends to make them run together and experience greater assimilation with surrounding sounds. This might have caused the voicing to stick around there.
In early Middle English times, a group of very common function words beginning with /θ/ (the, they, there, etc.) came to be pronounced with /ð/ instead of /θ/. Possibly this was a sandhi development; as these words are frequently found in unstressed positions they can sometimes appear to run on from the preceding word, which may have resulted in the dental fricative being treated as though it were word-internal.
In a comment, I note it is also rare to find a word than ends in voiced -th (without an e following it), with smooth and the verb mouth /maʊð/ being notable exceptions. And by rights, that one really ought to be spelled mouthe, like all the others (bathe, clothe, breathe, etc.). Voicing wasn’t phonemic at the ends of words, and happened only with a following inflectional vowel. Hence unvoiced in nouns house, wolf, bath but voiced in verbs house, wolve, bathe, even when not in the third-person singular -s form.
This is related to the intervocalic voicing described above. It is retained even when we have lost final e, whether just in pronunciation or in spelling as well.
thick /ðɪk/ is in dialect use from Cornwall and Hants to Worcester and Hereford; and also in Pembroke, Glamorgan, and Wexford. In many parts it has also the form thicky, thickee, or thicka. It generally means ‘that’, but. . . .
In English, the digraph th is pronounced as the voiceless [θ] at the beginning of a word in almost all circumstances. The exceptions are all short function words, such as articles, demonstratives, and commonplace adverbs:
(The above list is not exhaustive.) These words all use the voiced sound [ð].
Any other regular noun or verb which begins with th uses the voiceless sound [θ].
The reason for this is that in Old English and earlier forms of the Germanic languages, there was only a single interdental fricative, which alternately regularly between the voiceless form [θ] at the beginning of words and the voiced form [ð] in the middle of words. Modern English retains traces of this regularity, as th is usually voiceless at the beginning of a word (thin, think) and usually voiced in the middle of a word (mother, bathe). However, the intervening centuries have muddled this regularity so that there is no longer any completely consistent rule. It seems that short, common words like the ones listed above acquired the voiced pronunciation because they are usually reduced in speech, and not really pronounced as separate words.
After reading all these brillian replies and the Wikipedia entry on Phonology and distribution, it seems that one can get >90% correctly by following these few simple rules:
/θ/ - The rest
The following extract explains the origin and evolution of the different pronunciation of the TH digraph:
During late antiquity, the Greek phoneme represented by the letter ⟨θ⟩ mutated from an aspirated stop /tʰ/ to a fricative /θ/. This mutation affected the pronunciation of ⟨th⟩, which began to be used to represent the phoneme /θ/ in some of the languages that had it.
One of the earliest languages to use the digraph this way was Old High German, before the final phase of the High German consonant shift, in which /θ/ and /ð/ came to be pronounced /d/.
The Old English Latin alphabet adapted the runic letters ⟨þ⟩ (thorn) and ⟨ð⟩ (eth) to represent this sound, but the digraph ⟨th⟩ gradually superseded these letters in Middle English. However, in early Old English of the 7th and 8th centuries, the runic letters were initially not used yet and the digraph used in its place.
In Old and Middle Irish, ⟨th⟩ was used for /θ/ as well, but the sound eventually changed into [h] (see below).
Other languages that use ⟨th⟩ for /θ/ include Albanian and Welsh, both of which treat it as a distinct letter and alphabetize it between ⟨t⟩ and ⟨u⟩.
Voiced fricative /ð/:
English also uses ⟨th⟩ to represent the voiced dental fricative /ð/. This unusual extension of the digraph to represent a voiced sound is caused by the fact that, in Old English, the sounds /θ/ and /ð/ stood in allophonic relationship to each other and so did not need to be rigorously distinguished in spelling. The letters ⟨þ⟩ and ⟨ð⟩ were used indiscriminately for both sounds, and when these were replaced by ⟨th⟩ in the 15th century, it was likewise used for both sounds. (For the same reason, ⟨s⟩ is used in English for both /s/ and /z/.)
In the Norman dialect Jèrriais, the French phoneme /r/ is realized as /ð/, and is spelled ⟨th⟩ under the influence of English.
sometimes appears in early Old English, on the Roman model, and it returned in Middle English with the French scribes, driving out eth by c. 1250, but thorn persisted, especially in demonstratives (þat, þe, þis, etc.), even as other words were being spelled with -th-. The advent of printing dealt its death-blow, however, as types were imported from continental founders, who had no thorn. For a time y was used in its place (especially in Scotland), because it had a similar shape, hence ye for the in historical tourist trap Ye Olde _______ Shoppe (it never was pronounced "ye," only spelled that way).
The awareness that some Latin words in t- were from Greek th- encouraged over-correction in English and created unetymological forms such as Thames and author, while some words borrowed from Romanic languages preserve, on the Roman model, the Greek -th- spelling but the simple Latin "t" pronunciation (as in Thomas and thyme).
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?