Here's why that is the case.
If these bonding electrons spend more time on one of the two atoms that form a covalent bond, then that atom will develop a partial negative charge.
Likewise, the other atom will develop a partial positive charge, since the bonding electrons spend less time surrounding it.
This results in the formation of a polar covalent bond.
Now, when two atoms form a covelent bond, their respective electronegativity values will tell you which atom will hold on to the bonding electrons for longer periods of time.
These bonding electrons will spend more time surrounding the more electronegative atom and less time surrounding the less electronegative atom.
When two atoms have equal electronegativities, the bonding electrons will be shared equally between the two atoms, i.e. they will spend half of the time surrounding one and the other half surrounding the other.
This is characteristic of a nonpolar covalent bond, and is what you have when two nitrogen atoms,
Since you're dealing with two nitrogen atoms, which will of course have the same electronegativity value, the resulting bond will be nonpolar covalent, instead of polar covalent.
On the other hand, notice that oxygen is more electronegative than nitrogen, which means that it will attract those bonding electrons for longer periods of time
SIDE NOTE A difference in electronegativity of