Thunder

     As many people know, thunder follows after and is the result of lightning. Like the famous equation seen on the right says, as the temperature in  a gas increases, so too will the volume. Put simply: as you heat a gas up, it expands. In the case of lightning, it rapidly heats the to roughly 18,000 ºF causing a wave of pressure from the force of the heated air expanding at incredible speeds; it is this wave of pressure that produces the sound of thunder that can be heard up to 25 miles from the bolt of lightning itself.
(pressure)(volume)=(# of moles)(gas
                            constant)(temperature)
http://www.calctool.org/CALC/chem/c_thermo/ideal_gas.png

lightning and
                                    thunder diagram
http://cdn.files.3rdl.com/107820/file.ashx
     The reason that thunder always comes after lightning is not only because lightning must cause thunder, but also because the speed of light (roughly 300,000,000 meters per second) is much faster than the speed of sound (roughly 340 meters per second). A cool trick is to count how many seconds are between when you see the flash of lightning and hear the roar of thunder and then divide that number by 5 to see how many miles away from you the lightning is!