Calculations of the field distribution in the structure of the dielectric substrate/buffer layer/volume phase grating/analyzed medium were performed. It is shown that in the presence of a buffer layer with a low refractive index in the dielectric waveguide leads to a shift of the maximum field at the waveguide resonance into analyzed medium. As a result, the spectral and angular sensitivity of the corresponding sensor increases. Based on the waveguide equation, analytical expressions are obtained that connect the spectral and angular sensitivity of the sensor to the sensitivity of the propagation constant change due to the refractive index change of the analyzed medium. The conditions for the excitation of the resonance of surface plasmon–polariton waves in the structure with a metal or dielectric grating on a metal substrate are also given. The fields that occur at resonance for silver and gold gratings are calculated.