A molecule that has hydrogen bonding usually follows these two premises.
1.) There is a hydrogen atom involved
2.) Hydrogen must be bonded to a highly electronegative element which are nitrogen ($\ce{N}$), fluorine ($\ce{F}$) and oxygen ($\ce{O}$).
Seeing that both oxygen and chlorine have a small difference in their electronegativity (oxygen being roughly 3.5 and chlorine being roughly 3.0), why does chlorine in a hydrogen chloride molecule ($\ce{HCl}$) have a dipole-dipole interaction, while the oxygen in a water molecule ($\ce{H2O}$) causes the water molecule to have a stronger form of dipole-dipole interaction called hydrogen bonding? I do not understand this since chlorine is just as electronegative as oxygen and nitrogen?
Edit: I should also added that nitrogen and chlorine have the same EN value (3.0)