What causes thunder?

Astatic electricity in the air
Bthe sudden heating of the air by a lightning bolt
Cthe movement of raindrops and hail within the cloud
Dthe formation of raindrops out of rapidly condensing water vapor?