If nearly 79% of the atmosphere is made of nitrogen how could there be a shortage of nitrogen in soil?
Nitrogen is only useful to plants if it is in the form of nitrogen compounds .
Nitrogen as a gas is useless as plant food as it hardly dissolves in water. Plants need nitrogen in the form of ammonium-
Some plants (like Leguminosae) have a symbiosis with certain bacteria in their roots, that can bind nitrogen into useful compounds.
This group of plants (think of beans, peas, etc.) are often sown first on barren ground, and after harvesting the beans the rest of the plants are plowed under (this is called 'green-fertilizing').
Later we used (nitrate) fertilizers that were mainly made of guano (=bird or bat poo). Chile was one of the great sources.
Still later we developed ways to bind nitrogen from the air with hydrogen in the Haber-process to make ammonia and ammonium compounds, which could also be converted into nitrates.
The most nitrogen-rich compound is ammonium nitrate
(ANFO-bomb means 'ammonium nitrate + fossil oil'.)
While most of the atmosphere is made up of nitrogen, soils are not part of the atmosphere. Just because there is an abundance of nitrogen in the atmosphere does not mean there is an abundance of nitrogen in the biosphere*.
Nitrogen in the atmosphere is of limited use for biological processes and must be transformed in an energetically expensive process. This is called nitrogen fixation and it can occur through lightening or through biological fixation.
You may wish to review the nitrogen cycle.