The ionisation energy of the atom is the energy required to lose electrons from an atom, molecule or gas.
According to the periodic table Ionization energy is the energy requires to lose an electron from an atom to form its ion.
Oxygen is smaller than Nitrogen and have low ionisation energy. This is because in half filled orbital of Oxygen when an electron is added there arises some repulsion which reduce the energy of ionization.
As we move from top to bottom in a group ionisation energy decrease.
As we move left to right in a period ionization energy increases.