Lightning is a large discharge of static electricity. During a thunderstorm, clouds build up a charge. When there is a big difference in charge between the cloud and its surroundings, the cloud discharges a lightning bolt.