Before
A cloud charged like a battery
Inside a thundercloud, where the air rises fast and the temperature is between −15 and −25 °C, small ice crystals collide with soft hail. The crystals come away with a positive charge and are carried to the top of the cloud. The hail keeps a negative charge and stays in the middle and lower part.
The ground under the storm takes on a positive charge in answer. The air in between is an insulator. It holds until the difference becomes too large.