The role of phonons in the soft-x-ray radiation process from a valence band to a core level in an insulator is studied theoretically. A three-band system composed of a dispersionless core band, a conduction band, and a valence band, with wide energy gaps between them, is taken as a typical example. Phonons with a finite dispersion are assumed to couple weakly only with a hole in the core band (core hole). Using this model, we calculate the resonant second-order optical process composed of an excitation of an electron from the core band to the conduction band by an incident x ray, and a subsequent transition from the valence band to the core band by radiating another x ray. Without the phonons, the momentum of the core hole is expected to be well defined by the resonance condition of the incident x ray. However, this momentum is dissipated by the phonons. If the radiation occurs completely after this dissipation, we obtain a so-called luminescence, which is independent of the incident x ray. In this case, the spectral shape fully reflects the density of states (DOS) of the valence band. However, if the radiation occurs long before this dissipation effect, we obtain a resonant Raman scattering that depends on the incident x ray. The spectral shape of this Raman scattering has a sharp peak, quite different from the DOS. The relative intensity between these two components is determined by the phonon dispersion, the lifetime of the core hole, and the core-hole\char21{}phonon coupling constant. From this theoretical framework, we have concluded that there are various cases, i.e., Raman-dominant cases and luminescence-dominant cases, as well as intermediate cases, in good agreement with various experimental observations. The B $1s\ensuremath{\leftrightarrow}2p$ transitions of cubic BN are concluded to correspond to a luminescence-dominant case.