Our understanding of the speed of light and the speed of sound is very very new yet it was observable always. When did people start catching on? Do we know how a person would understand this 2,000 years ago?
Interestingly, many of the theories we have from the Ancient Greek world do not appear to have an understanding what we consider to be so obvious as to take for granted: that the thunder is the sound of lightning. For example, Anaximander believed that thunder was caused by the movement of air in a storm — it was air blowing against clouds. He saw the lightning as something caused by this blowing, as the fire in the air was being ignited because of the force of the air being beaten against the cloud.
Anaxagoras believed (like many then) that there was an upper atmosphere composed of a fiery aether, and that what one was seeing in a storm was the upper atmosphere lowering into the one below it. The lightning was the fiery aether manifesting in the realm of air. The thunder was caused by it being extinguished.
Aristotle, in his Meteorologica, argued that the atmosphere was made up of two "exhalations," one that is dry and hot, one that is moist and cool. Thunder was the dry exhalation, and once expelled from the atmosphere, it caught fire and became lightning. This approach, like much of Aristotle's theories, would dominate thinking in the Hellenistic period that followed, and remain popular in Europe for several thousand years.
What to make of all of this? One is that ever-present reminder that we see these things through particularly "modern" eyes, and may not even ask the right question. They don't seem to have considered it a question of the speed of sound and light, because they didn't see these things as being the same phenomena, and thus that is a somewhat irrelevant question to ask for them! And even the very simple observation that "thunder is the sound of lightning" was not something they had come up with, because their theories of how meteorology worked did not understand these phenomena at all the way we do today.
Lest we wonder if this all got resolved quickly one people put down their Aristotle: no. Descartes believed thunder was the sound of one cloud falling on another; lightning was a flammable exhalation between clouds. John Wallis took a more chemical approach in the 17th century, arguing that the chemicals responsible for gunpowder must be present in clouds, and igniting. At least he linked the two phenomena, but not correctly: thunder was the explosion, lightning was the flash of the explosion.
The more modern understanding of both phenomena appears to date as recently as the 19th century, with a full explanation not present until the 20th century. (The electrical nature of lightning was confirmed in the 18th century, famously by work by Benjamin Franklin, but the connection with thunder was still apparently not understood that well.) How obvious it seems to us now, having been raised with it!
My summaries of views above come from a short article: H. Howard Frisinger, "Early Theories on the Cause of Thunder and Lightning," Bulletin of the American Meteorological Society 46, no. 12 (December 1965): 785-787.