The reason why nitrogen is so abundant in the air has to do with the way our planet was formed. When the Earth was first formed, it was covered in hot magma, or molten rock. As the planet cooled, the gases that were present in the atmosphere began to condense and form the air we breathe today.
Nitrogen, being a very stable gas, was able to remain in the atmosphere as the planet cooled. Other gases, like hydrogen and helium, were not as stable and escaped into space. This is why there is very little hydrogen and helium in the Earth's atmosphere today.
Another reason why nitrogen is so abundant in the air is because it is not used up by living things in the same way that oxygen is. Plants and animals need oxygen to breathe, but they do not need nitrogen in the same way. It is due to all of these factors that there's 78% nitrogen in the air.