Ionization energy is dependent on the electronic configuration of an element. For this reason, there are some deviations in the gradual increase of ionization potential of elements as one goes from left to right in a period. For example, the I.P. of oxygen is less than that of nitrogen. Nitrogen atoms have the electronic formation 1s2 2s2 2p3. Nitrogen has three electrons in the p-orbital and every electron block all the three p-orbital with aligned spins and stays farther distant. Oxygen atoms have the electronic formation 1s2 2s4 2p4. Oxygen has small ionization energy (than that of nitrogen). The mainly constructive array of electrons in the oxygen 2p subshell is one doubly-occupied orbital and two singly-occupied orbitals.
The Electronic configuration of the two elements:
O (8) — 1s2 2s2 2px2 2py1 2pz1
When one electron is removed from it, O+ ion is formed, whose electronic configuration is;
O+ (7) — 1s2 2s2 2px1 2py1 2pz1
Due to the exactly half-filled 2p orbital, this configuration is relatively more stable and hence less energy than usual is needed to remove one electron from oxygen atom i.e; the first ionization potential of oxygen is relatively low.
On the other hand, the electronic configuration of nitrogen is:
N(7) — 1s2 2s2 2px1 2py1 2pz1; which is relatively stable due to exactly half tilled 2p orbital. Removal of one electron results to the breaking of this stable configuration. Hence relatively more energy is needed for the removal of one electron hum nitrogen atom.
So, the first ionization potential of nitrogen is higher than that of oxygen.
As the electrons in nitrogen p-orbital are half-filled and are constant and need more energy to eliminate one electron. Because oxygen has a doubly-occupied orbital, it is easier to eliminate the further electron from that orbital than it is to remove an electron from one of the nitrogen’s singly-occupied 2p orbitals; therefore, oxygen has lesser primary ionization energy. As we can see that Nitrogen has half filled p orbitals which are relatively constant arrangement as compared to 2p4 configuration of Oxygen atom so it is hard to confiscate one electron from this steady pattern. A more comprehensive and high-level answer would argue how nitrogen experiences bigger replace energy between the 2p orbitals than oxygen does. Further, the removal of one electron from Oxygen atom is comparatively simple because it results in partially filled constant p orbital arrangement. That’s why ionization energy of Nitrogen is more than Oxygen.
In nitrogen: [He] 2s2 2p3
In oxygen: [He] 2s2 2p4
You must be familiar with that an atom containing half filled or completely filled orbitals are very constant. Nitrogen has a half-filled 2p orbital. This tells us that it should be easier to take out an electron from oxygen than it is for nitrogen as the electron in oxygen is somewhat further away from the nucleus meaning lesser nuclear charge. On the other hand, since Oxygen is already unbalanced comparative to Nitrogen, by losing one electron it attains a steady half-filled 2p orbital. So oxygen undergoes ionization at comparatively inferior energy. This is why nitrogen has higher ionization energy than oxygen.