Can chlorine form hydrogen bonds?
Nitrogen is equally electronegative as chlorine but also more compact.  Whether you consider hydrogen bonding as purely electrostatic or having a covalent character (The lone pair on atom X overlaps the molecular orbital in the H-Y bond of an adjacent molecule, thus partially delocalizing the bond), the more compact structure of nitrogen offers an advantage.