I was reading about the development of the quantum theory when I got to the explanation for spectral lines. It's a topic that I've revisited many times but I came up with a question. I know that in some interactions with matter the amount of energy absorbed or transmitted in the form of photons is quantized but then what processes lead to the wide spectrum of frequencies that we observe in an object's electromagnetic spectrum? For example in a star what is going on in the nucleus that we get radiation in most frequencies?
2 Answers
The main source of opacity that defines the visible photospheric continuum of the Sun is that due to H$^{-}$ ions. This has been understood for 80 years (Wildt 1939). These ions are in an equilibrium with neutral hydrogen atoms, where the additional electron can be ejected due to the absorption of photons (bound-free absorption) with a continuum of energies and vice-versa can be formed via the emission of a continuum (free-bound emission) of photon energies.
Talk of atomic transitions is a red herring. Of course these occur, but are responsible for the emission of photons at relatively discrete energies and from higher up in the atmosphere (that's why they appear as "dark" absorption lines).

- 130,455
All the material in the outer region of the Sun has thermal motion, which includes vibration and continuous excitation/de-excitation of atoms and ions. This goes on at all frequencies from zero to high, with a peak around the visible spectrum and tailing off above that. This motion produces light through various mechanisms, including electrons changing energy levels in atoms and ions, and also electrons simply accelerating and bumping into things during their random motion. Any acceleration of a charged particle will result in electromagnetic radiation.
This process is similar in many respects to what goes on in the filaments of light bulbs working by the glowing filament method. The main difference is that the white-hot filament of a light bulb is solid metal whereas the Sun is plasma and gas. But the thermal motion producing acceleration and oscillation at all frequencies is similar.

- 58,183
As you probably know, the matter in the sun is a plasma which is comprised of charged particles (ions and electrons, not bound to each other) and when these accelerate they can emit a photon, whose frequency depends on the acceleration, not on the spectra of atomic states.
– Aug 08 '19 at 18:56