Lightning occurs due to the existence of our particular 'atmosphere', and due to a change in potential between that atmosphere and the surface.
There is no evidence that there was lightning before there was 'life' and a conducive atmosphere on the planet. All evidence shows that the atmosphere has substantially changed over time, and that the prokaryotes and eukaryotes helped build this atmosphere.
How do you explain lightning on Earth, Jupiter, Saturn, Uranus, and possibly Venus and Neptune?
To the contrary, it is seen in other planets in our solar system with very different atmospheres. For example, Venus
Mars
Jupiter