All life requires nitrogen-compounds, e.g., proteins and nucleic acids.
But most organisms cannot use nitrogen in this form. To break it apart so that its atoms can combine with other atoms requires the input of substantial amounts of energy. The enormous energy of lightning breaks nitrogen molecules and enables their atoms to combine with oxygen in the air forming nitrogen oxides. These dissolve in rain, forming nitrates, that are carried to the earth. The ability to fix nitrogen is found only in certain bacteria.