The gross selection rule for the observation of vibrational Raman transitions is that the polarisability of the molecule should change as the molecule vibrates. Both homonuclear and heteronuclear diatomics fulfill this requirement, so both molecules are vibrationally Raman active.
If we approximate the potential energy curve of a vibrating bond as a parabola (i.e. assume that the vibration is harmonic) then the specific selection rule for vibrational Raman transitions is Δν = ±1.
Transitions for which Δν = -1 lie to high frequency of the incident radiation, and are called the Stokes lines.
Transitions for which Δν = +1 lie to low frequency of the incident radiation, and are called the anti-Stokes lines. These are usually more intense than the Stokes lines, as the Stokes lines require the molecules to initially be in excited vibrational states, which is a relatively rare occurrence.
In gas-phase spectra, the lines of the vibrational spectrum have a branch structure similar to that of the lines in an infra-red vibrational spectrum. They again arise from rotational transitions simultaneous with the vibrational transitions.
In this case, the selection rules are ΔJ = 0, ±2 (as in pure rotational Raman spectroscopy), and the three branches are termed the O branch (ΔJ = -2), the Q branch (ΔJ = 0), and the S branch (ΔJ = +2).
Note that in Raman spectroscopy, the Q branch is always observed.
This diagram is a schematic representation of the rotational structure within a vibrational line in a high resolution Raman spectrum.Note that in this diagram, unlike that for the infra-red rotation-vibration spectrum, the frequency (and thus the wavenumber) increases from right to left.