(1) The heat and light released during lightning enable nitrogen in the air to combine with oxygen to form oxides of nitrogen. These get dissolved in water to form dilute nitric acid that comes down with rain. The acid reacts with salts in the soil to form nitrogenous compounds that are essential for the growth of plants.
(2) Lightning also enables ozone to be formed from the oxygen in the air. The ozone present in the air stops the harmful ultraviolet rays of the sun from reaching us.