There are essentially two ways of generating coherent radiation from solid-state devices:
- Classical electronic oscillators, in which charge is made to oscillate back and forth within a device... the frequency of radiation corresponds to the frequency of charge oscillation.
- Solid-state lasers, in which charge-carriers undergo a transition between two quantum states... here, the frequency corresponds to the energy separation between the states.
The literature often refers to a "terahertz gap", because both of these approaches hit their limit around the ~0.1-10 THz band. Classical oscillators stop working at high frequencies because the speed of oscillation is limited by capacitive effects, and the transit time for electrons to move around the device. Conventional semiconductor lasers stop working at low frequencies because (as has been mentioned in the previous answer) the band gap of materials is much too large (1 THz = 4 meV), so even "narrow" band gap materials like InSb or HgCdTe are far too big (a few hundred meV).
Quantum cascade lasers (QCLs) can generate radiation in the 1-5 THz band, with output powers exceeding 1 W by exploiting transitions between pairs of quantum-confined states entirely within the conduction band of a semiconductor heterostructure. Since the states in the valence band are unused, the bandgap of the material is (almost) irrelevant. THz QCLs are still limited to cryogenic temperatures, however, since any thermal excitation can kill the laser action very easily by redistributing electrons between the very closely-spaced states.
Another very significant challenge for creating THz semiconductor lasers comes from the need to confine light within the laser medium. At near-infrared/visible, the wavelength is a few microns or shorter, and so it is possible to create semiconductor lasers with dimensions much greater than this wavelength. As such, optical dielectric waveguides can be created quite easily that confine light simply through a difference in the refractive index of the laser material and its cladding. At THz frequencies, however, the wavelength is hundreds of microns, and this would require QCLs to be made much thicker than the practical (and financial!) limit of epitaxial growth technology. As such, alternative waveguide approaches based on surface plasmons (i.e., the light field is tightly "pinned" to the interface between a metal and a semiconductor).
However, at these long wavelengths, a great proportion of the energy from the THz radiation is lost to free electrons in the metal.
Another limiting effect in semiconductors comes from Reststrahlen absorption (in which photons are absorbed by mechanical vibrations (phonons) in the crystal lattice). In GaAs (the most common THz QCL material), the Reststrahlen absorption occurs around 36 meV (or ~9 THz), which effectively makes it impossible to generate THz radiation anywhere near that frequency in GaAs.
Altogether, these effects make the development of THz semiconductor lasers quite challenging!