Here's why:
* Oxygen has six valence electrons and wants to have eight (to achieve a stable octet).
* Hydrogen has one valence electron and wants to have two.
* The hydroxide ion has a negative charge, indicating an extra electron.
This extra electron, along with the six from oxygen, allows the oxygen atom to form a single covalent bond with the hydrogen atom. This single bond is a shared pair of electrons, giving each atom a full outer shell.