Nitrogen has lower electron affinity than its preceeding element carbon because
(a)Nitrogen atom has half filled p-orbital
In general Electron affinity value becomes less negative with he increasing atomic radius because electrostatic force of attraction decreases between the electron being added and the atomic nucleus due to increase of distance between them
Electron gain enthalpy α 1Atomic size
Now, we know that
N < C [Atomic radius]
But N has half filled p- orbital which is very stable.
Adding an electron will not be easy to N. because of the presence of half-filled orbital.
Now, in case N, C and O.
It should be O > N > C [EA]
Because C > N > O [Atomic Radius]
But, nitrogen has half filled p- orbital which is very stable, therefore it would not like add one electron to its configuration.
Therefore, carbon has lowest electron affinity.