Relative strengths of hydrogen bonds
As a short answer, Hydrogen bonds (for elementary chemistry) are formed with donation of lone pair of a lewis base into LUMO of H attached to a highly electronegative atom. A better donor makes a better bond and more electronegative atom makes a better bond. From my experience, the second factor overrides the first one in most cases.

N is a better donor than O and H in $\ce{O-H}$ is a better acceptor than H in $\ce{N-H}$.