Why does air conduct electricity while lightning even if it is a very bad conductor of electricity ?
When the potential difference (or voltage) between 2 points are very high, the insulator in between has very high stress. For air, it gets starts ionizing.
When the voltage(developed in the cloud) exceeds the threshold level which air can withstand(with respect to ground level), the charge is discharged suddenly to the ground, breaking the insulation property of air, that we see as lightning.