Air is a bad conductor of electricity in other words it is an insulator. Like other insulators its insulation strength ( known as dielectric strength) may breakdown at high voltages. While lightening, a high voltage is induced between clouds, this high voltage breakdowns the insulation of air and travels to other objects.