Thunderstorms are in correlation with Earth' surface elecricity, the electric circuit caused by the potential-differences of different localities on the Earth's surface.
Electricity on Earth surface is realated to the telluric electricity and in addition to that the atmospheric electricity, deriving from solar radiation, ionisation, solar winds, ionospheric wind and rain. Anthropogenic items, such as high voltage electrical wires influence the electrial circuit in Earth surface as well.
You can find an interesting study from Ch. Gaetan (2007) about the Earth's surface electric potential, elecrical circuits and the thunderstorms. The study is attached here.
Gaetan Chavalier, The Earth’s Electrical Surface Potential: A summary of present understanding, 2007