Nonmetals have relatively high electronegativity, so both atoms in the bond want to keep the electrons that are being shared between them. This creates a covalent bond.
If one nonmetal has a different electronegativity than the other, the shared electrons will on average be closer to the more electronegative atom. This difference results in the bond being polar covalent.