Why does the distance between atoms in a hydrogen bond impact the strength of the bond?
The main attractive force between the nuclei and the electrons is electromagnetic, positive and negative attracting. When two atoms are "pushed" together each one shares its own electrons with the other one's nuclei, and they bond. So why wouldn't they nuclei just get as close to each other as possible, so that they each would feel as many electrons as possible? At the same time, the electrons are repelling each other, and the nuclei repel (same charges repel). The bond length is a function of this "equilibrium" that is reached between the attraction of the nuclei to the electrons, and the repelling of the nuclei  and the repelling of the electrons. Therefore, if they begin to "close the gap" as you say, there will be more repelling than attracting, and they will move farther away from each other, and return to the lowest energy distance, the original bond length.