Thunder is caused by the sudden expansion of the air around a lightning bolt's path. The deep rumbling and sharp cracks of thunder are produced as the air around the lightning bolt is superheated — up to about 54,000° Fahrenheit (about 33,000° Celsius) — and rapidly expands. This rapid expansion creates an acoustic shock wave that manifests itself as thunder. The closer the lightning is, the louder the clap of thunder will seem to be.
Lightning is a discharge of electricity in the atmosphere. A lightning strike takes just a few thousandths of a second to go from the clouds to the ground or an object that is raised off the ground, then to go back up to the clouds along the same pathway. The electrostatic discharge raises the air surrounding this pathway to a temperature that is roughly five times hotter than the surface of the sun. This happens so quickly that the heated air doesn't have enough time to expand and becomes compressed to many times the normal atmospheric pressure. As the compressed air expands outward, it creates an acoustic shock wave that is heard as thunder.
What Affects the Sound
The location and shape of a lightning bolt will affect how the thunder sounds to a listener, as will the ambient temperature of the air. A nearby lightning strike will sound like a loud crack or snap, and lightning that is rather away will sound like more of a long rumble as the shock waves bounce off the clouds and hills. A forked lightning bolt also can sound like a rumble as the sound waves bounce off each other.
In addition, thunder will sound louder when the air near the ground is colder and the air higher in the atmosphere is warmer. This is because the acoustic shock waves get "trapped" in the cold air. Such a temperature difference, called an inversion, tends to happen at night, which is why thunder often sounds louder at night.
Early Explanations
Before the 20th century, science could not explain the sounds of thunder, so the cause was a matter of much dispute. Early Greeks believed that it was caused by clouds colliding. Other theories included vacuums, exploding gases and steam. Thor, a god of Norse mythology who is named for the Old Norse word for thunder, usually is portrayed as wielding a thunder-clapping hammer.