How does the hydrogen atom know which frequencies it can emit photons at? At university, I was shown the Schrodinger Equation, and how to solve it, including in the $1/r$ potential, modelling the hydrogen atom.
And it was then asserted that the differences between the eigenvalues of the operator were the permitted frequencies of emitted and absorbed photons.
This calculation agrees with experimentally measured spectral lines, but why would we expect it to be true, even if we accept that the electron moves according to the Schrodinger equation?
After all, there's no particular reason for an electron to be in an eigenstate.
What would make people think it was anything more than a (very suggestive) coincidence?
 A: 
This calculation agrees with experimentally measured spectral lines, but why would we expect it to be true, even if we accept that the electron moves according to the Schrodinger equation? After all, there's no particular reason for an electron to be in an eigenstate.

Good question! The function $\psi$ does not need to be Hamiltonian eigenfunction. Whatever the initial $\psi$ and whatever the method used to find future $\psi(t)$, the time-dependent Schroedinger equation
$$
\partial_t \psi = \frac{1}{i\hbar}\hat{H}\psi
$$
implies that the atom will radiate EM waves with spectrum sharply peaked at the frequencies given by the famous formula 
$$
\omega_{mn} = \frac{E_m-E_n}{\hbar},
$$
where $E_m$ are eigenvalues of the Hamiltonian $\hat{H}$ of the atom. 
Here is why. The radiation frequency is given by the frequency of oscillation of the expected average electric moment of the atom
$$
\boldsymbol{\mu}(t) = \int\psi^*(\mathbf r,t) q\mathbf r\psi(\mathbf r,t) d^3\mathbf r
$$
The time evolution of $\psi(\mathbf r,t)$ is determined by the Hamiltonian $\hat{H}$. The most simple way to find approximate value of $\boldsymbol{\mu}(t)$ is to expand $\psi$ into eigenfunctions of $\hat{H}$ which depend on time as $e^{-i\frac{E_n t}{\hbar}}$. There will be many terms. Some are products of an eigenfunction with itself and contribution of these vanishes. Some are products of two different eigenfunctions. These latter terms depend on time as $e^{-i\frac{E_n-E_m}{\hbar}}$ and make $\boldsymbol{\mu}$ oscillate at the frequency $(E_m-E_n)/\hbar$. Schroedinger explained the Ritz combination principle this way, without any quantum jumps or discrete allowed states; $\psi$ changes continuously in time. Imperfection of this theory is that the function oscillates indefinitely and is not damped down; in other words, this theory does not account for spontaneous emission.
A: The idea here is increasingly complex depending on how deep into modern physics you want to delve, but also key to understanding quantum mechanics. So, I'll give a bit deeper explanation than it seems you've seen, but there's plenty more.
It's understood that a photon acts both as a particle and a wave. As a particle it has an amount of energy associated with it, and as a wave it has a wavelength and frequency. These two values are directly related; you can know one from the other.
A good first thought experiment is to consider a particle in a hypothetical one-dimensional box. It can only bounce back and forth along one direction and in a finite distance. It will settle into any one of a number of quantized states thay have a wavelength that "fit," as I'm guessing you understand from your studies.
Extend that idea to an electron, then, which is confined to "orbit" the atom. It is three dimensional and the forces involved are not infinite potential barriers, but the idea of the particle's wave settling into a frequency that "fits" still holds.
Now, when an atom absorbs or emits a photon, the energy is absorbed into or emitted by one of the quantized electrons, causing it to gain or lose energy equal to that of the photon. Since the electron can only have discrete amounts of energy, we can calculate the energy of the photons emitted!
A: 
This calculation agrees with experimentally measured spectral lines, but why would we expect it to be true, even if we accept that the electron moves according to the Schrodinger equation?

Your puzzlement  arises because  you are putting the cart in-front of the horse. The cart is the theoretical model of quantum mechanics and the horse is the data. As your question is migrated from math.SE one can understand this orientation, which is dominant also here.
The whole theoretical package of Quantum Mechanics did not arrive by a seemingly  holy inspiration ( as some physical theories having to do with apples is said to have been), but was a slow accumulation of observations that forced physicists to think outside of the box of the mathematics used in classical mechanics and thermodynamics. 
It started with the table of elements, the photoelectric effect, the black body radiation, the spectral lines in atomic spectra.  All these could not be squeezed within the classical models.  Bohr tried with his model. 
The photoelectric effect forced thinking into light as particles, (once more , as Newton had proposed particles), the photons.
Then  it was known and expected in classical electromagnetism that an accelerating electron would lose energy in the form of radiation into light,( so photons come into any radiation). This would be a continuous spectrum. Classical mechanics and classical electromagnetism could not produce the spectral lines, because by the classical equations the electron should fall on the nucleus emitting a continuous spectrum in the field of the protons, not the distinct spectra lines which were observed . So Bohr postulated that the electron was staying into orbits with specific energy and could only lose energy in photons ( the classical expectation) in quantized steps. This explained the phenomena mathematically by fitting series to the spectral lines, but was not satisfactory because it gave no framework for the other observations listed above, of forced states , quantized states for energy changes in the atomic micro framework.

After all, there's no particular reason for an electron to be in an eigenstate.

I explained the particular reason, if it were not in  a stable orbit  there would not be spectral lines to be observed  and we would not have atoms,  and be here discussing this
in the physical form we have.

What would make people think it was anything more than a (very suggestive) coincidence?

The postulates of Quantum Mechanics  imposed on the mathematical solution  of the Schrodinger equation brought logic  and a causal path to the random efforts for a theoretical framework, outside the box of classical theories. So the appropriation of the differential equation now called "Schrodinger equation" to interpret the data was not a coincidence but a great think outside the box of classical theories. By imposing the physical postulates on the interpretation of the solutions, the fortuitous fits of the Bohr model series could be understood as derived from a formal mathematical physical theory.
A: Conservation of energy.
If we measure the energy of an atom, we will always report an eigenvalue, because we are forcing it into an eigenstate (this is something like the quantum mechanical definition of measurement).  Now suppose that we measure the energy of an atom twice, before and after it emits a photon.  For conservation of energy to hold, the energy of the photon must be the difference of the two eigenvalues.
It may be that the atom is not in an eigenstate exactly when it emits the photon, but an emission with energy level not a difference of eigenvalues would produce apparent contradictions as soon as we attempted to measure the change in energy.
A: To have emission (or absorption) of photons you must have a Hamiltonian that includes those degrees of freedom also. If your system consists of (a) the electromagnetic field and (b) a hydrogen atom, you can specify the state with (a) for each frequency, the number of photons with that frequency and (b) the state of the hydrogen atom, in your favorite way, for example $1s$ or $2p$. You could write $\vert n_\omega=1, 1s\rangle$ for a state with 1 photon of frequency $\omega$ and the atom in the state 1s.
To calculate the probability for a transition between the states $\vert i\rangle$, meaning no photons and hydrogen atom in initial state $i$, and $\vert n_\omega =1, f\rangle$ where $f$ is some final state, you need to calculate an inner product like $$P = \langle n_\omega =1, f|O|i\rangle$$
where $O$ is some operator. The probability for the transition is then something proportional to $|P|^2$. The most significant contribution comes from the electric dipole moment operator and this is a standard calculation in textbooks. The result is that $P$ is proportional to $$P\propto \frac{\sin(t(\omega + \omega_f - \omega_i)/2)}{(\omega + \omega_f - \omega_i)/2}$$
where $\omega_f, \omega_i$ are the related to the initial and final energies by $\hbar\omega_f = E_f$ and similarly for $i$, and $t$ is the elapsed time. Clearly $P$ can be non-zero even if energy isn't conserved.
However, in the limit $t \to \infty$, $|P|^2$ approaches something proportional to $t\delta(\omega + \omega_f - \omega_i)$ where the $\delta$ is a Dirac delta. This is where conservation of energy comes from. The statement that atoms can emit photons only at specific frequencies is false if taken literally, each spectral line comes with a natural width corresponding to that $P$ for finite $t$ is non-zero even away from $\Delta E = 0$.
You can find a detailed calculation of $P$ in any textbook on quantum mechanics. I learned from Townsend's A Modern Approach to Quantum Mechanics, but I think you will find this calculation Sakurai's or Griffiths's books also.
