All plants require nitrogen in order to grow well. However, the nitrogen must be in a soluble form so it can be absorbed either through the leaves or the roots of a plant. The earth's atmosphere is about 79% nitrogen in the form of N2 but N2 is a very stable molecule held together by three chemical bonds so it takes a high amount of energy to break those bonds.
When lightning discharges in the atmosphere some of that energy breaks the nitrogen-nitrogen bonds and converts the nitrogen to various nitrogen-oxygen compounds. These compounds are water soluble and are carried down to the ground with rain water to nourish the plants.
The nitrogen cycle is basically a cycle that helps plants and animals in taking in nitrogen as they are not able to take it from air. It is the process that involves the conversion of nitrogen into compounds that can be absorbed by plants and animals.
The role of lightning in the nitrogen cycle is to combine nitrogen and oxygen to form nitrogen oxide.