Lightning can't happen in the atmosphere of any place in the solar system that doesn't have a convective atmosphere or something similar. That rules out Mercury, the Moon, and other bodies without air, like asteroids, as sources of lightning in the air or from volcanoes.