Why does oxygen form the #"O"_2^(2-)# ion?
Oxygen needs 2 more electrons to fill its outermost shell.
Here's a very, very cool picture of a model representing the oxygen atom
As you can see, oxygen has 2 of its 8 electrons in the shell closest to the nucleus, and the remaining 6 electrons - which are called valence electrons - in its second shell - this is oxygen's outermost shell. In order to complete its octet, it needs 8 electrons in its outermost shell.
Since it already has 6, it would only require 2 more electrons to complete its octet.