Ionization energy of oxygen is less than that of nitrogen because 2p subshell of nitrogen is half filled, and half filled orbitals have some extra stability, so removing electrons from them will be little more difficult.
And In oxygen atom, 2 of the four2p electrons must occupy the same 2p orbital resulting in an increased electron electron-repulsion.
N=1s22s22p3
O=1s22s22p4