There is electricity in the air.  Sometimes the electricity jumps suddenly from one cloud to another or from a cloud to the earth. This makes a bright flash which is called lightning. When the lighting passes through the air, the air becomes very hot.  This makes a sound called thunder.