Nice question! There's a property of an optically active medium called birefringence, which just means that the refractive index of the medium depends on how the light is polarised.
A glucose solution exhibits circular birefringence, where left-handed and right-handed circularly polarised light propagate with different speeds. This sort of birefringence occurs when the sample contains net non-zero amount of molecules of a certain chirality [(D) or (L)]; chirality is just a fancy way of saying that if you reflect the molecule in a mirror then you can't superimpose it on the original molecule. For example glucose is chiral because it contains a number of carbon atoms each of which are connected to four distinct groups.
For a plane EM wave traveling along the ##z## axis you can generally write the electric field as ##\mathbf{E}(z,t) = \mathcal{Re} \left[(a \hat{\boldsymbol{x}} + b \hat{\boldsymbol{y}})e^{i(kz - \omega t)} \right]## where ##a## and ##b## are the complex amplitudes (##a = a_0 e^{i \phi_x}##, ##b = b_0 e^{i \phi_y}##) in the ##x## and ##y## directions.
First you have a linearly polarised wave from the polariser (that is, ##\phi_x = \phi_y##), for which without loss of generality you can just take ##\mathbf{E}(z,t) = \mathcal{Re} [(A \hat{\boldsymbol{x}}) e^{i(kz - \omega t)}]## for some real number ##A##. You can write this equivalently as the sum of two oppositely circularly polarised (##\phi_y = \phi_x \pm \frac{\pi}{2}##) waves,$$\mathbf{E}(z,t) = \frac{1}{2} \mathcal{Re} \left[ A(\hat{\boldsymbol{x}} + i \hat{\boldsymbol{y}} ) e^{i(k_1 z - \omega t)} \right] + \frac{1}{2} \mathcal{Re} \left[ A(\hat{\boldsymbol{x}} - i \hat{\boldsymbol{y}} ) e^{i(k_2 z - \omega t)} \right]$$Outside of the circularly birefringent material you'll have ##k_1 = k_2 = k = n \omega / c##, but once the light passes into the material ##n_1 \omega / c = k_1 \neq k_2 = n_2 \omega / c##, if the two refractive indices are ##n_1## and ##n_2##. In other words, the two waves begin to accumulate phase with increasing ##z## at a relative rate of ##\frac{\omega}{c} (n_2 - n_1) := \frac{\omega \Delta n}{c}##. If you let ##\xi## be the distance the light has traveled in the medium (i.e. let ##z = z_0 + \xi##, where ##z_0## is the coordinate of the start of the material), then the change in relative phase over this distance will be ##\delta(\xi) := \frac{\omega \xi \Delta n}{c}##. So the equation of the electric field on the other side of the material is the sum of two contributions with a relative phase ##\delta(L)## (abbreviated ##\delta##),
$$
\begin{align*}
\mathbf{E}(z,t) &= \frac{1}{2} \mathcal{Re} \left[ A(\hat{\boldsymbol{x}} + i \hat{\boldsymbol{y}} ) e^{i(kz - \omega t)} \right] + \frac{1}{2} \mathcal{Re} \left[ A(\hat{\boldsymbol{x}} - i \hat{\boldsymbol{y}} ) e^{i(kz - \omega t)} e^{i\delta} \right] \\ \\
&= \frac{1}{2} \mathcal{Re} \left[Ae^{i (kz - \omega t + \frac{\delta}{2})} \left( (\hat{\boldsymbol{x}} + i \hat{\boldsymbol{y}} )e^{-\frac{i \delta}{2}} + (\hat{\boldsymbol{x}} - i \hat{\boldsymbol{y}} )e^{\frac{i \delta}{2}} \right) \right] \\ \\
&= \mathcal{Re} \left[Ae^{i (kz - \omega t + \frac{\delta}{2})} \left(\frac{e^{\frac{i \delta}{2}} + e^{-\frac{i \delta}{2}}}{2} \hat{\boldsymbol{x}} - \frac{e^{\frac{i \delta}{2}} - e^{-\frac{i \delta}{2}}}{2} i \hat{\boldsymbol{y}} \right)\right] \\ \\
&= \mathcal{Re} \left[Ae^{i (kz - \omega t + \frac{\delta}{2})} \left( \cos{\frac{\delta}{2} } \hat{\boldsymbol{x}} + \sin{\frac{\delta}{2} } \hat{\boldsymbol{y}} \right)\right] = \mathcal{Re}[(A \hat{\boldsymbol{n}})e^{i(kz - \omega t+ \frac{\delta}{2})}]
\end{align*}
$$where ##\hat{\boldsymbol{n}} = \cos{\frac{\delta}{2}} \hat{\boldsymbol{x}} + \sin{\frac{\delta}{2}} \hat{\boldsymbol{y}}## is the unit vector obtained by rotating ##\hat{\boldsymbol{x}}## anti-clockwise by ##\delta / 2##. In other words, the plane of polarisation has tilted by an angle ##\delta / 2##!
Because ##\delta \propto \omega##, the angle by which the plane of polarisation tilts depends on the frequency of the light passing through the glucose. If you observe with white light incident on crossed polars, then those particular frequencies which have their polarisation angle tilted by a multiple of ##\pi## will pass through the glucose un-rotated, so are not transmitted through the analyser (which is at ##\frac{\pi}{2}## to the polariser). The colour seen is then the so-called "complementary colour", which you can determine by looking at the
Michel-Levy chart.