Lightning is electricity produced during thunderstorms when air molecules rub together. If you rub a balloon on your head on a dry day, you may notice your hair trying to stick to the balloon.
And if you've ever run the soles of your shoes across the carpet and then given someone a shock just by touching them, you have reproduced electricity in the same way lightning happens.
Thunderstorms are caused by rising air lifting high into the sky where the clouds cool and become heavier. As they sink back down to earth, the up and down motion causes friction, just like with the balloon or your shoes.
Bolts of electricity can move from cloud to cloud, from cloud to the ground, or stay inside a cloud. The bolts that reach the ground are the most dangerous.
A single bolt of lightning has a temperature of 50,000 degrees. The temperature of the sun is only 11,000 degrees.