Rhymes are one way of knowing how things were pronounced. For example, if ‘care’ and ‘there’ suddenly start to rhyme, when they didn’t previously, we know that the well-known and well-documented effects of /r/ on the previous vowel must now have begun to take place, and that the vowels have around that time merged.
A second very common source is loan words to and from other languages. For example, the fact that the various Nordic kings called (in the Old Norse manuscripts) Óláfr (later Ólafr) around the 10th and 11th centuries were by the Anglo-Saxons called Ānlāf, as well as the fact that the Gaelic speakers borrowed the name as Amlaíb, is the only reason we know that the old nasal vowel /ãː/ was still pronounced as a nasal vowel as late as the 11th century in Old Icelandic. Just a few generations later, when the earliest surviving manuscripts of the First Grammatical Treatise start to appear, it is clear that the distinction between nasal and non-nasal vowels has been lost. (Nasal vowels are described and discussed in the treatise, but the manuscripts, which are all later than the original text, clearly show that the scribes who copied them did not distinguish them, and subsequently got them mixed up.)
Then there is spelling. Nowadays, spelling is relatively fixed and authoritarian (and in the case of English, remarkably divorced from what is actually said), but in previous stages of languages, it was not. People spelt out what they said as they said it. That gives a good many clues. When studding-sail starts becoming more and more infrequent in texts, but instead the more recent spelling stunsail gains frequency, we can be quite certain that the /d/ in ‘studding’ has been all but entirely lost in the speech of those who use the word.
Finally, a fourth and extremely useful source, when it’s available, is users of the language themselves and their descriptions of sound changes as they happen. In the oldest of texts, little of this is available, but as knowledge of reading and writing steadily spread and grew over the centuries, more and more ‘normal’ or ‘informal’ texts appear, often including writers lambasting the youth of ‘today’ for dropping their final e’s, or glorifying the days of yore when people still spoke Proper Language and pronounced the final e’s. Though I do not actually know this, I would consider it quite likely, with the amount of texts from the Chaucerian period available to us, that such texts do exist and enable us to pinpoint the change rather precisely.
There are other clues here and there, but these three are the main ones.