hydrogen bonding is a force of attraction between h atom and electonegative atom(O,N.F and to some extent Cl).one lone pair on electronegative atom is compulsory to attract one H.as O has two lone pairs so it has tendency to make two H-bonds with H.in the case of NH3 it has five electrons in its outermost shell.three electrons are already occupied by 3 Hydrogens. remaing lone pair is 1 so this lone pair can attract only one H-atom.this is the reason.
The bond between the two is a hydrogen bond. It is not a strong bond like a covalent, nor does it actually involve the transfer of electrons, but it does cause two molecules to "stick" together. The classic (and the most important) case of hydrogen bonding is with water.
H2O and its Bonding Structure The molecular composition of water is H2O. This means that two Hydrogen atoms are bonded to a central Oxygen atom. These bonds form a bent shape because of the two lone pairs that are not involved in the actual bonds. This structure creates angles of about 104.5 degrees.