Why do single elements in a molecule have an oxidation state of zero?
Oxidation states are something of an "accounting fiction", used to describe where electrons are spending most of their time in a molecule.  This is turn is dictated by electronegativity: the more electronegative, the more the element attracts electrons.

So when you say oxygen's oxidation state is -2, this is only with respect to other elements of lower electronegativity. Now in the case of oxygen, the only other element with higher electonegativity is fluorine. For example, the molecule Oxygen Difluoride ($\ce{OF2}$) has oxygen in the +2 oxidation state because fluorine is more electronegative!  For any other element in combination with oxygen, however, we assume the electrons spend their time with the oxygen filling its outer valence shell, thus the -2 oxidation state.

But two oxygens in a molecule of gas have the same electronegativity, and there is no way to say that the electrons want to spend more time with one or the other oxygen.  Therefore, the "average" electron state for an oxygen molecule is as for the individual atoms, and so the oxidation state is 0.