why is the ionisation energy of oxgen less than that of nitrogen even if oxygen is to the right hand side of nitrogen?

Nitrogen has half filled 2p sub shell

1s2 2s2 2p3
whereas Oxygen has four electrons in 2p
1s2 2s2 2p4
A p shell has 3 sub orbitals
That fourth electron is in an orbital already occupied by another electron, so it is not held as tightly.

Or one can argue that the nitrogen has a set of p orbitals that is half filled and half filled orbitals (or filled orbitals) are more stable than those that are not.

The ionization energy is the energy required to remove an electron from a neutral atom, resulting in a positively charged ion. While it is true that nitrogen is to the left of oxygen on the periodic table, the ionization energy of oxygen is actually lower than that of nitrogen.

To understand this, we need to consider a few factors:

1. Effective nuclear charge: The ionization energy is influenced by the attractive force between the positively charged nucleus and the negatively charged electrons. The effective nuclear charge experienced by an electron is determined by the number of protons in the nucleus and the shielding effect of inner electrons. Oxygen has 8 protons, while nitrogen has 7 protons. However, oxygen has two inner electron shells (with a total of 2 electrons) that provide more shielding compared to nitrogen's one inner electron shell (with a single electron). Thus, oxygen's effective nuclear charge is slightly reduced, making it easier to remove an electron.

2. Electron configuration: Oxygen has an electron configuration of 1s²2s²2p⁴, while nitrogen has an electron configuration of 1s²2s²2p³. Oxygen has two fully occupied electron shells (1s and 2s) and a partially filled 2p orbital. Removing an electron from the 2p orbital requires less energy compared to removing an electron from the 2s orbital of nitrogen, which is more stable with a fully occupied shell. Therefore, less energy is needed to ionize oxygen.

Overall, even though oxygen is located to the right of nitrogen on the periodic table, the factors of effective nuclear charge and electron configuration contribute to a lower ionization energy for oxygen. Keep in mind that the trend in ionization energy is not solely determined by the position of the elements on the periodic table, but by a combination of these factors.