The atomic mumber of oxygen is 8.
It has an electronic configuration of 2,6
It needs to have 8 electron in its outer shell,so if it 'bonds' with
another oxygen atom 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.