The bond between the N and 0 (double bond) transfers and gives a -ve charge on O and a +ve charge on N atom at the group . Thus the +vely charged nitrogen is electron-deficient pulling electrons towards itself!
The combination of the +vely charged nitrogen and the electronegative oxygen atom leads to delocalization causing the resonance effect.