Light-scattering spectrum in dielectric crystals is studied with extended thermodynamics (ET) for a phonon gas, covering from hydrodynamic to ballistic (collisionless) regimes. The ET equation is solved to obtain the power spectrum of the energy density in a phonon-gas mixture, which consists of interacting phonon gases of longitudinal and transverse acoustic (LA and TA) phonon modes. In the hydrodynamic regime, where phonon collisions take place frequently, it is found that the light-scattering spectrum consists of two components, which can be interpreted as the two normal modes formed by the two second-sound modes defined in each of the LA and TA phonon gases. Out of the two normal-mode spectra, the low-frequency component arises from thermal fluctuations and gives rise to a narrow quasielastic spectrum, which corresponds to the well-known thermal Rayleigh scattering due to thermal diffusion, i.e., due to overdamped second sound. With sufficient momentum-conserving phonon collisions (normal phonon scattering), the narrow quasielastic component is demonstrated to develop, from the diffusive central peak, into a pair of shifted inelastic peaks due to propagation of underdamped second sound. The other spectrum component gives rise to a much broader quasielastic scattering, whose wing extends out to the Brillouin-scattering lines of the LA and TA phonons (first sounds). The broader quasielastic spectrum has a linewidth equal to the phonon-collision rate, which suggests that this component originates from a nonequilibrium process in the phonon gas. As the ballistic regime is approached, the line shapes and linewidths of the two normal-mode spectra approach each other, and the two components finally coincide in the limit of the ballistic regime, which is in good agreement with the reported behavior for these spectra that were experimentally observed in many crystals. In the ballistic limit, the light-scattering mechanism in the present model is found to become formally equivalent to the previously proposed microscopic framework, i.e., the second-order difference Raman scattering (two-phonon difference light scattering) on a same phonon dispersion. The derived spectral formula is fitted to the spectra previously observed in the experiments for rutile $({\text{TiO}}_{2})$ and strontium titanate $({\text{SrTiO}}_{3})$. The fits are quite successful in wide ranges of frequency and temperature, i.e., regardless of degree of nonequilibrium, owing to the ET analysis. The relaxation times for the normal and resistive phonon collisions (${\ensuremath{\tau}}_{\text{N}}$ and ${\ensuremath{\tau}}_{\text{R}}$) are determined through the analysis. The temperature dependences of ${\ensuremath{\tau}}_{\text{N}}$ and ${\ensuremath{\tau}}_{\text{R}}$ indicate that the origin of the broad shifted peaks (the ``broad doublet''), which were observed in ${\text{SrTiO}}_{3}$ at around 30 K, is likely due to underdamped second sound at least in a narrow temperature range around 30 K.