In one line, lightning is a bright flash of electricity that is produced by a thunderstorm.
Within a thundercloud way up in the sky, many small bits of ice (frozen raindrops) bump into each other as they move around in the air. All of these collisions create an electric charge. After a while, the whole cloud fills up with electrical charges. The positive charges or protons form at the top of the cloud and the negative charges or electrons form at the bottom of the cloud. Lightning results from the buildup and discharge of this electrical energy between positively and negatively charged areas. Lightning can occur within the cloud or between the cloud and the ground as well. In the second case, this electrical charge strikes around anything that sticks up, such as mountains, people, or single trees.
When a lightning bolt travels from the cloud to the ground it actually opens up a little hole in the air, called a channel. Once the light is gone, the air collapses back in and creates a sound wave that we hear as thunder. The reason we see lightning before we hear thunder is because light travels faster than sound!
Remember, lightning is approximately six times hotter than the surface of the sun! So, don’t play around during lightning and always look for a safer place or stay indoors.