Strength of Hydrogen Bond and Angle
Empirical data

If you analyze crystal structure data for short intermolecular distances between hydrogen atoms and potential acceptor atoms, you will find a distribution of these angles. The simplest explanation for this distribution is that there is a favorable interaction that is strongest for the most commonly observed angles. The fit between empirical data and computational results is fairly good, e.g. https://www.researchgate.net/publication/242862021_Distribution_of_hydrogen_bond_angles_in_molecular_crystals

Dipole-dipole interactions

If you treat hydrogen bonds as pure dipole-dipole interactions (Q-Y ... H-X), you expect the bond to be directional. After all, you maximize the interaction by close approach of the negative partial charge on the acceptor and the positive partial charge on the donor (i.e. the hydrogen atom in a polar bond). However, for this model the angular dependence should be symmetrical, i.e. there should be a similar decrease in bonds strength when you rotate the donor or the acceptor away from a colinear arrangement. The "rules" for hydrogen bonds say otherwise. It is more important that the angle at the hydrogen atom is maximal (Y ... H-X) than that the angle at the acceptor atom is maximal (Q-Y ... H).

Covalent contribution

There is a covalent contribution to the hydrogen bond that explains why a linear arrangement around the hydrogen atoms is favored. The strongest hydrogen bonds are those where hydrogen bond and covalent bond with hydrogen become interchangable ("symmetric hydrogen bonds"). In his 2002 review, Steiner wrote:


  All hydrogen bonds can be considered as incipient proton transfer reactions, and for strong hydrogen bonds, this reaction can be in a very advanced state.


There is some controversy whether the hydrogen bond has covalent character, and some question how to describe it theoretically (as a 3 center 4 electron bond?). There is, however, strong evidence from NMR that there is indeed a covalent contribution because nuclei couple in a through-bond fashion across hydrogen bonds (e.g. this review).