You can develop it for all but the spin quantum number, this was done by Sommerfeld.
Justifying the quantum condition
The basic law is the old quantization condition for integrable classical systems:
$$ J = \oint p dq = nh = 2\pi n \hbar $$
This rule holds for each periodic motion separately, in cases where the motion is integrable and so multi-periodic. One should justify this rule, and there are two ways, Einstein's and Bohr's.
Bohr's justification is by considering that electromagnetic radiation is quantized, and that you should be able to couple the mechanical system to electromagnetism in arbitrary ways. Imagine that you couple the classical system to an electromagnetic field weakly, say by making the dipole moment be equal to the cosine of one of the angle variables. Then you get outgoing radiation with frequency equal to the orbital period (the outgoing waves are periodic because the coupling is weak, so the backreaction is negiligible). The angle variables are periodic with period $2\pi$, so the classical frequency of the orbit (in terms of orbit radians per second) is equal to the rate of change of the angle variable, which by Hamilton's equations is:
$$ {d\theta\over dt} = {\partial H\over \partial J} = f $$
Since the outgoing radiation comes in quanta of size hf, the energy carried away by the individual quanta causes losses to lower energy levels, in steps, and the condition for consistency is that the steps are of size $hf$. This means that the steps in energy are in increments given by the above. This clearly works to lowest order when J is integer spaced in unit of h, since:
$$ H(J-h) = H(J) - h {\partial H \over \partial J} = H(J) - hf $$
So this justifies the quantum rule for each independent action variable.
Einstein's justification relies on the fact that the action J (the integral above) is adiabatic invariant. This means that if you change the Hamiltonian smoothly and slowly over time (the precise condition is that the Fourier transform of H shouldn't involve the frequencies which are comparable to any of the classical inverse periods), then the motion in the changing Hamiltonian keeps the J constant, so that the J value at the end is the same as the J value at the beginning.
But in quantum mechanics, if you smoothly change H, the energy level must be preserved, since at no point do you provide the frequency required for a transition. This means that whatever quantity you quantize, it should be adiabatic invariant. Planck's law for quantizing radiation tells you that the harmonic oscillator has $J=nh$, and the adiabatic hypothesis means that this rule should be general.
These rules are only precise to give the first-order level spacing, they do not take into account a possible additive constant.
Quantizing a central force--- the orbital and magnetic quantum number
Consider a particle described in polar coordiantes, $r$, $\theta$ and $\phi$, whose Lagrangian is
$$ L = \int {1\over 2} (\dot{r}^2 + \dot{\theta}^2 + \cos^2(\theta) \dot{\phi}^2) - V(r) $$
The rotational motion has a conserved angular momentum, and the angular momentum conservation law gives you that $ L_z $ is constant. The conjugate variable to $L_z$ is $\phi$, as you can see from the fact that $\phi$ doesn't appear in the action without a time-derivative, so it's conjugate momentum is conserved, and is nothing other than $L_z$.
Applying the quantum condition
$$ \int L_z d\phi = 2\pi L_z = mh $$
gives you that the z-component of the angular momentum is quantized in integer multiples of $\hbar$, and the integer is "m" the magnetic quantum number. It is called this, because it gives the magnetic moment of the orbit, assuming no spin, and therefore the spinless Zeeman splitting.
This is not the entire angular motion, however. You need a second action and angle variable for the second variable $\theta$. $\theta$ won't do because it's not an angle. But
$$L^2$$
the length of the angular momentum is also conserved, and the conjugate variable to this quantity is the angle variable of the motion restricted to a plane. This variable I'll also call $\theta$, but it's another $\theta$, it's the angle between the central force origin and the particle when you rotate the orbit to be planar.
The quantum condition for this action-angle pair gives that:
$$ 2\pi L = l h$$
or that the total angular momentum is quantized in multiples of $\hbar$. From geometry, $m\le l$.
The radial motion
To solve the radial motion, you make an effective hamiltonian for r, by considering the Lagrangian for motion in r alone:
$$ \int {1\over 2} \dot{r}^2 - {L^2\over 2r^2} + {1\over r} $$
The way to solve this is to explicitly find the momentum $p_r$ at every position $r$,
$$ p_r = \sqrt{2E - {L^2\over r^2} + {1\over r} } $$
Then integrate $p_r$ between the classical turning points
$$ 2\int p_r dr = kh $$
Where k is a new quantum number. To do the integral, you take out a factor of ${1\over r^2}$ from inside the square root, complete the square (remembering that E is negative, and dimensionalize to get an integral of the form:
$$ \int {\sqrt{ 1- u^2} \over u + C} du $$
which is elementary when you transform coordinates using $u=\cos(\theta)$. The result is that you get an infinite sequence of k orbits at any l, of energy
$$ E \propto {1\over (k+l)^2} $$
identifying k+l as the principal quantum number n completes the derivation, and provides the restriction $l<n$, except you need to start k off at 1, not zero. This is the proper H spectrum, excluding spin.
Deficiencies
The semiclassical quantization procedure breaks the rotational symmetry. It has ambiguities at the boundaries, and it is generally hokey (does the H-atom ground state have l=0 or l=1? I did it so that it's l=0 above). But it's not arbitrary, and it is guaranteed to be correct to leading order. In the H-atom, it happens to be exact, up to the arbitrariness in the procedure.
In the old days, the spin was thought to be a breakdown in the quantization rule, requiring half-integer values sometimes, until Pauli and others understood the electron carried angular momentum itself.