Two hydrogen atoms far apart don't affect each other. As they approach, each electron starts to feel both nuclei, the clouds merge, and the energy drops. Pushed closer still, the two nuclei repel and the energy shoots up. The bottom of the dip is the bond: the atoms settle 0.074 nm apart, 4.5 eV lower in energy than when they were separate, and pulling them apart takes that 4.5 eV back.