Two oxygen atoms combine to form oxygen molecule by sharing two electron pairs. Each oxygen atom (2, 6) has six electrons in the valence shell. It required two electrons to acquire nearest noble gas configuration. Therefore, both the atoms contribute two electrons each for sharing to form oxygen molecule. In the molecule, two electron pairs are shared and hence there is a double bond between the oxygen atoms.