Why does water form hydrogen bonds?
Since oxygen is so much more electronegative than hydrogen, this means that it will have a much stronger influence over electrons when bonded (it's an electron hog).
This means the electrons spend the majority of the time around the oxygen atom, creating a slightly negative charge for oxygen and a slightly positive charge for hydrogen.
The slightly positive hydrogen atoms of one water molecule will thus be attracted to the slightly negative oxygen atoms of another water molecule (Coulombic attraction). Here's a diagram of that attraction:
However, oxygen is not the only element that is capable of doing this and hydrogen bonding is exhibited in many other molecules.
Other elements that are electronegative enough to cause hydrogen bonding forces are nitrogen and fluorine. Other molecules that have hydrogen bonding forces are ethanol, hydrofluoric acid, and ammonia.
Hope this helps!