The oxidation number of oxygen in H2O2 is -1. The state of oxidization directly corresponds to the change in the number of electrons when one atom joins other atoms in a compound.
H2O2, or hydrogen peroxide, can act as an oxidizing agent as well as be oxidized. This means that the peroxide is able to gather two more electrons and for a hydrogen ion. This would further change the oxidization number of the oxygen in the ion to -2. Peroxide can also act as a reducing agent, which means that the molecule loses two electrons and becomes an O2 molecule. The oxidation number of the oxygen then becomes zero.