An O atom has 6 valency and
needs 2 electrons, each, to form a noble gas configuration. Hence, each share
the amount of electrons each short of, in this case – 2 electrons, to form
stable molecule. The contribution hence now becomes 4 electrons and what left
on each oxygen atom are 4 electrons. We combine each 4 electrons on oxygen atom
with the 4 electrons shared and hence we get 8 valency for each oxygen atom – a
noble gas configuration!