Why is ionization energy of nitrogen higher than oxygen?
Ionization energy
The amount of energy required to liberate one mole of electrons from the outer shell of one mole gaseous atom of an element to an infinite distance is called the ionization energy of that element.
The electron configuration and ionization energy of oxygen and nitrogen are as follows:
N(7) ⇒ 1s2 2s2 2px1py1pz1 Ei = 1402 kJmol-1
O(8) ⇒ 1s2 2s2 2px2py1pz1 Ei = 1314 kJmol-1
Since the electron configuration of oxygen is O (8) = 1s2 2s2 2px2py1pz1, removing an electron from it gives the electron configuration as 1s2 2s2 2px1py1pz1. The singly positively charged oxygen O+ ion is relatively more stable due to its electron configuration of half-filled 2p orbitals. As a result, the first ionization energy of oxygen is relatively low.
On the other hand, the electron configuration of nitrogen atom is N(7) 1s2 2s2 2px1py1pz1 which is relatively more stable due to three half-filled 2p orbitals. Removing an electron from it breaks this stability. That is why the ionization energy of oxygen is lower than the ionization energy of nitrogen.