Molecular nitrogen (N2) is not, by itself, a greenhouse gas, as it does not absorb heat in the frequency range of terrestrial radiation. Some nitrogenous compounds, however, such as nitrous oxide (N2O), do act to retain heat and drive greenhouse warming.
Energy in the infrared part of the spectrum can strike molecules of a greenhouse gas and be absorbed. The impact of the photon causes the greenhouse gas molecule to deform, changing its structure as the radiant energy is converted to kinetic energy. Though this kinetic energy may be transmitted to N2, the nitrogen molecule itself does not absorb infrared light directly.