Here's why:
* Mercury (Hg) has a +2 oxidation state in most of its compounds.
* Peroxide (O2) has a -2 oxidation state.
To balance the charges, we need one mercury atom (Hg+2) and one peroxide group (O2-2), resulting in the formula HgO2.
The formula Hg2O2 would represent a compound with two mercury atoms and one peroxide group. This is not a stable or commonly known compound.