Thunder and lightning are caused by the rapid expansion of air heated by a lightning bolt. Lightning is a discharge of electricity that occurs between positively and negatively charged regions within a thundercloud or between the cloud and the ground. The rapid expansion of air around the lightning bolt creates a shock wave, which we hear as thunder.