Oxygen has four groups of electrons surrounding it: two sets of lone pairs, and two pairs of electrons that it shares with hydrogens (in these pairs, one electron comes from each of the oxygen and the hydrogen). Atoms with four bonding groups normally adopt a tetrahedral structure (like methane), where there is a bond angle of 109.5o, as this minimises the repulsion felt by electrons. However, the lone pairs around oxygen repel more than bonding pairs, and this means that, for each lone pair, the bond angle is reduced by 2.5o. There are two sets of lone pairs here, so the H-O-H bond angle is 104.5o.