Why aren't all absorption spectra continous if the translational energy of any particle is, under most circumstances, close to continous? As the title suggests, I am puzzled as to why the absorption spectrum of, for instance, hydrogen gas isn't nearly continous for all wavelengths considering that the translational energy of a hydrogen molecule in a large container is close to continous. Given that the translation energy of the hydrogen molecules is close to continous, why isn't the absorption spectrum of hydrogen gas close to continous as well? Why don't photons with energies different than those corresponding to specific transition energies get absorbed and increase the kinetic energy of the hydrogen molecules? What's so special about translation energy?
As I wrote this question, I realized that, from the perspective of the atom, it could always be at rest. Particles at rest cannot absorb photons solely to increase their kinetic energy as such a situation does not conserve both kinetic energy and momentum. Could that be why hydrogen gas molecules do not absorb photons of all wavelengths even though the translational energy of a hydrogen molecule is continous?
 A: The translational energy of the emitting or absorbing particle contributes to Doppler broadening, which causes the spectral lines to be wider than they otherwise would.  Additionally, there are other causes of broadening that can widen the lines even further.  However, for atomic spectra the magnitude of this broadening is generally much smaller than the spacing between the lines, so the spectrum still appears as a series of discrete lines.  For very closely spaced lines, such as the rotational and vibrational modes of molecular gases, the broadening can be enough to smear the lines together into a continuum.  In these cases we usually call them "bands" instead of "lines".
A: 
Particles at rest cannot absorb photons solely to increase their kinetic energy as such a situation does not conserve both kinetic energy and momentum. Could that be why hydrogen gas molecules do not absorb photons of all wavelengths<...>?

Yes, that is the reason.
Photon can only be absorbed if the internal state (thus internal energy) of the atom changes in the process. That energy has quantized values $E_i,\: i\in\mathbb{Z}_+$. Resulting in the quantized energies of the photons absorbed.
Additional remarks: $\\ $

*

*Kinetic energy of an atom "has something to do" with the above picture (contrary to the niels nielsen's answer): the quantized energies $E_i$ above of the photon (that gets absorbed) are defined in the atom restframe. In the reference frame where the atom moves these energies get additional Doppler shift. That is the reason of the broadened absorption lines, if the light is absorbed by an ensemble of atoms moving with different velocities.



*You are talking about "atoms" in some parts of the questions, about "molecules" in other parts. For molecules the physics is a bit more complicated, there are more internal degrees of freedom, rotational, vibrational -- yet these also have quantized energy spectrum, so the above applies to molecules as well.

*Speaking about Rayleigh scattering in this (proper quantum) description adds to the confusion. Compton scattering fits into the description more easily. Note that it is indeed scattering, the photon is not absorbed, there is an atom/molecule + a photon in the out-state. So the argument about the impossibility to absorb the photon without modifying the internal energy of the absorbing particle does not apply.

A: Photons interact through their electromagnetic field so they interact most strongly with charged particles. If you had a plasma of ionised hydrogen the absorption spectrum would indeed be continuous as the photons interact with electrons and $\mathrm H_2^+$ ions through a process called Compton scattering. The photons are not completely absorbed, but they transfer part of their energy to the kinetic energy of the electrons and ions.
However for neutral hydrogen the molecules have no net charge and the interaction is much weaker. The photons can still interact to some extent through a process called Rayleigh scattering, so in principle there is still a continuous absorption spectrum but it is so weak that it is difficult to observe unless you have a hydrogen sample many miles thick. In the atmosphere, which is many miles thick, Rayleigh scattering is responsible for the blue colour of the sky.
Note that while the Compton and Rayleigh scattering spectra are continuous they are not wavelength independent, that is the absorption coefficient depends on the wavelength. For example the intensity of Rayleigh scattering is proportional to the fourth power of the photon frequency.
The sharp absorption lines that we see for atoms and molecules are an example of resonant scattering. Even though the atom or molecule is neutral we get a high absorption coefficient when the photon frequency matches the oscillation frequency of the superposition formed by the initial and final states. The resonance makes the interaction strong even though the atom or molecule is overall neutral. However as you observe in your question this happens only at the resonant frequencies not as a continuous spectrum.
A: The absorption spectrum is generated by electron transitions between energy levels within the atom's orbital structure. it doesn't have anything to do with the kinetic energy of an atom in motion.
