By providing energy to convert the nitrogen and oxygen in the air into nitrates or NOx compounds that can be used by plants. The compounds are then washed into the soil by rain.
'Each lightning bolt changes atmospheric nitrogen and oxygen into nitrates or NOx compounds which are washed in to the soil by rain.'
http://www.answers.com/Q/How_does_nitrogen_return_to_the_soil
'...lightning that accompanies thunderstorms can act to add nitrogen to the soil. Gaseous nitrogen (which makes up about 78 percent of the atmosphere) is unusable by higher plants because of its chemical composition. Nitrogen is transformed to a plant-usable form (nitrogen fixation) by the electrical discharges that can occur within thunderstorms.
The usable nitrogen is added to the soil as a component of precipitation. While this process is beneficial to plants, the vast majority of nitrogen fixation is accomplished by microorganisms in the soil.'
http://www.startribune.com/lifestyle/homegarden/44463677.html
Nitrogen gas (N2) is the largest constituent of the Earth's atmosphere, but this form is relatively nonreactive and unusable by plants. Chemical processing or natural fixation (through processes such as bacterial conversion) are necessary to convert gaseous nitrogen into compounds such as nitrate or ammonia which can be used by plants.
Nitrogen is present in the environment in a wide variety of chemical forms including organic nitrogen, ammonium, nitrite, nitrate, nitrous oxide, nitric oxide or inorganic nitrogen gas. Organic nitrogen may be in the form of a living organism, humus or in the intermediate products of organic matter decomposition. The processes of the nitrogen cycle transform nitrogen from one form to another. Many of those processes are carried out by microbes, either in their effort to harvest energy or to accumulate nitrogen in a form needed for their growth.
Atmospheric nitrogen must be processed, or "fixed", to be used by plants. Some fixation occurs in lightning strikes, but most fixation is done by free-living or symbiotic bacteria known as diazotrophs.
https://en.wikipedia.org/wiki/Nitrogen_cycle