Light is emitted at all energies in the visible spectrum of the Sun, nothing is missing. It is just that the solar spectrum is darker at some wavelengths; these are associated with discrete electronic transitions in atoms, ions and molecules in the photosphere.
To understand why, consider the Sun as a big ball of hot gas that gets hotter the deeper you go into it. The radiation we get from the Sun arises from material at a depth that is shallow enough that the photons stand a good chance of escaping. This is how the photosphere is defined.
That depth is determined by the opacity of the overlying material at any particular wavelength. If the opacity is larger at some wavelengths then the photospheric emission at those wavelengths comes from higher in the solar atmosphere and hence from material at cooler temperatures. The Sun is mainly composed of hydrogen and helium, but there are important traces of heavier elements and these provide increased opacity at discrete wavelengths (with some broadening due to Doppler motions and collisions between atoms) corresponding to electronic transitions between their individual energy states (that are characteristic of each element).
Since the brightness of the emitting material scales as $T^4$, then where the opacity is high and photons are arriving from higher, cooler material, the Sun appears relatively dark at those wavelengths - known as absorption lines. Note that it is relatively dark, not missing - you are still looking at temperatures of thousands of Kelvin even at the centres of strong absorption lines.
A natural question is then to ask, why can't we see to the centre of the Sun at other wavelengths? The answer to that is that there are various mechanisms that provide (lower) opacity over a broad range of wavelengths too. These include the photoelectric effect in metal atoms like sodium and potassium and the continuum absorption provided by the ionisation of H$^{-}$ ions. These generally limit us to being able to see to depths in the Sun that reach about 6000 K.