How can the eigenvalue spectrum of a Hamiltonian operator be continuous? This is a stupid question and I know that I am most likely confusing different things. Please help. David J Griffiths writes

... some operators only have a continuous spectrum (for example, the free particle Hamiltonian)...

The eigenvalues of Hamiltonian is energy. And historically, quantum mechanics was developed based on the fact that energy cannot be continuous but in discrete packets when Max Planck used this reasoning to resolve the UV catastrophe. How come we come back in a circle and again say energy is continuous?
 A: You are confusing the relationship between energy quantization and the ultraviolet catastrophe. I think it has always been known that free particles have a continuous spectrum in quantum mechanics. 
To see why having a continuous spectrum does not lead to the ultraviolet catastrophe, let's consider the case of light. In this case, we know the energy spectrum is continuous because the photon can have an energy $\hbar \omega$ for any positive value of $\omega$. However, if we consider a thermal ensemble with many photons, we find that the energy spectrum of each mode is still quantized, since the mode can only be a integer number of photons at each $\omega$. This avoids the ultraviolet catastrophe because modes with $\hbar \omega \gg kT$ can't be thermally excited in order to get even the first photon, so they are "frozen out". Therefore the energy contribution from the high frequency modes is zero and the ultraviolet catastrophe is averted. (Notice there is still a divergence in the energy coming from the fact that the $\omega$s have infinitesimal spacing, but this is related to the fact that energy is extensive and we have an infinite system. In a spatially finite system, there is a discrete set of $\omega$s and this infinity is also averted.)
A: The solution of the Schrodinger equation tells us when the energy is discrete and when it is quantized. 
That depends on the Hamiltonian operator. In the free particle problem the solution shows that energy is continuous, while in the particle in the box the solution tells us that the energy is quantized.
It is not something that we choose or guess. We solve the problem and we find out.
