Rising air. There's a principle in electrostatics called 'the separation of charges'. If you separate charged items, the voltage can become very large. So a rising column of air, that is charged, develops a big voltage and the air breaks down and a lightning bolt equalizes all that charge.
It's EXACTLY the same as walking across a carpet, dragging charges along with you, so that they are separated - then when you touch your little sister, she gets a big jolt.
The equation controlling this is C=QV. As C, the capacitance, decreases and Q, the charge, stays constant, V, the voltage increases.
the same thing that causes static electricity, but on a macro scale. the air, or the ground, become positively or negatively charged, and when they get charged enough it discharges, causing a spark if its between you and something else, or a lightning bolt if its in the sky