An electrical discharge (a spark) splits an oxygen molecule into two oxygen atoms. (Electrical discharge is also referred to as corona discharge.) These unstable oxygen atoms combine with other oxygen molecules. This combination forms ozone.
Ozone Formation from Lightning
Hundreds of pounds of ozone can be created with each lighting strike. Ozone is responsible for the "fresh air" smell after a lighting or thunder storm.