Covalent bonds are formed when two or more non metal atoms share one or more electrons to achieve stable configuration.
Diatomic molecules form non polar covalent bonds because they are linear and the charge distribution across the bond is the same; therefore, resulting in no net charge.