Let me set the scene; off somewhere in the distance the sky is dark, the winds pick up and the temperature drops slightly, those dark clouds are soon overhead and suddenly the sky lights up with a bolt of lightning followed by a booming clap of thunder. Thousands of years ago your first thought may have been that the gods were arguing and Zeus just thread the first punch, but today science has given us a slightly more reasonable explanation.
First things first; thunder comes with lightning and vice versa. In fact thunder is created because of lightning which is why you will always experience the two together. In that case we should to a quick overview of how lighting works. When lighting occurs it can heat the air to 70,000 in just a few milliseconds – now that's hot! With the air heating up so fast to such a hot temperature something dramatic must happen and if you've been in a thunder and lightning storm you know just how dramatic it can be – maybe you've joined your dog whimpering in the closet a few times or maybe you've had to peel your cat off the ceiling. The drama happens because a high majority of the electrical energy from lightning is transformed into heat and disappears into the atmosphere but less than 1% of the energy from lightning is converted into sound while the rest is converted into light and this is where thunder comes into play.
With this huge increase in pressure and temperature the air expends aggressively – think of your emotions when someone cuts in front of you in line after you've been waiting for an hour – at a rate faster than the rate of sound. After that shock wave goes beyond 30 feet it becomes the sound wave that we all know as thunder. It is very similar to a sonic boom created as a jet executes a flyby. Thunder is basically exploding air that moves along lighting. There are a few variables that will greater or less the loudness – which is measured in decibels – of the thunder and those include humidity, wind velocity, temperature and clouds.
The science community has certainly come a long way from the earliest belief that thunder was part of the arsenal of the gods or that it was a collision of the clouds.