What kind of molecule can experience hydrogen bonding?
If a molecule - held together by covalent bonds - contains atoms of elements with different electronegativity values - different levels of attraction for the shared electrons in the covalent bonds, then there can be some charge separation. The shared electrons have a greater probability of spending time at one end of the bond than the other.
This leads to a small negative charge where the electrons are spending more time, and a small positive charge where they are spending less time. These negative and positive charged areas of a molecule can be attracted to each other, and that attraction is referred to as 'hydrogen bonding'.
Things like the bend in the water molecule or the shapes of some other molecules increase the charge separation, or make it easier for the charged sites to approach each other, strengthening the hydrogen bonding.
The key ingredient, though, is electronegativity differences.