Thunder is caused by lightning, which is essentially a STREAM of electrons flowing between or within clouds, or between a CLOUD and the ground. The air SURROUNDING the electron stream is HEATED to as hot as 50,000 degrees Farhenheit, which is three times hotter than the SURFACE of the sun.