Historically, how was the connection between NMR peaks and hydrogen atoms made?
TL;DR: Scientists knew that electrons had a spin, and thought, &quot;wouldn't it be nice if atomic nuclei did too?&quot; When they passed molecular hydrogen through a homogenous magnetic field (in a modified version of the Stern–Gerlach experiment) and subjected it radio waves, they found energy was absorbed at precise frequencies. This set the stage for the usefulness of $^1\ce{H}$ NMR in the distant future.
Taken from A Brief History of Nuclear Magnetic Resonance:

In the mid-1920s it became apparent that many features in atomic spectra could be accounted for only if certain atomic nuclei likewise possessed spin and a magnetic moment. Refinements of the Stern-Gerlach experiment verified this concept by 1933.
In 1939 Rabi et al. made a major improvement in beam techniques by sending a stream of hydrogen molecules through not only the inhomogeneous magnetic field required for deflection, but also through a homogeneous magnetic field, where they were subjected to radio frequency electromagnetic energy. Energy was absorbed by the molecules at a sharply defined frequency, and the absorption caused a small but measurable deflection of the beam. This was the first observation of NMR, and Rabi received the Nobel Prize in 1944. However, such studies were limited to nuclei in small molecules under very high vacuum in a molecular beam, the deflection of which served to detect the resonance.