The atomic mumber of oxygen is 8.
It has an electromic comfiguration of 2,6
It needs to have 8 electron in its outer shell,so if it 'bonds' with
another oxygen otom and they both 'share'two of their electrons with each other,it has the effect
of allowing both atoms to have a complete outer shell.