Light from most ordinary light sources wiggles up and down, left and right, and diagonally. Your polarizing filter lets through only the light that is vibrating in one particular direction. In this polarized light, the light waves all wiggle in the same direction.
To understand what this means, picture waves traveling along a rope. If the waves vibrate up and down, they are vertically polarized. Vertically polarized rope waves can pass through the slots between the vertical slats in a fence; waves vibrating in other directions are blocked by the slats. If you orient a polarizing filter properly, vertically polarized light waves can pass through the filter, while waves vibrating in other directions are blocked.
The light emerging from the light source at the bottom of the tube is unpolarized. That means it vibrates in all directions perpendicular to the light’s direction of motion. The polarizing filter under the sugar solution polarizes this light so it vibrates in one direction only.
When polarized light passes through the Karo syrup, the direction of its polarization is changed. Light vibrating from to side to side, for example, might end up vibrating at a 45-degree angle. The amount of rotation depends on the depth of the syrup: The angle of rotation is proportional to the depth. It also depends on the concentration of the syrup: The more concentrated the syrup, the greater the rotation. Finally, the angle of rotation depends on the wavelength or color of the light. Blue light, with its shorter wavelength, rotates more than longer-wavelength red light.
When the white light emerges from the sugar solution, each color in the light has its own direction of polarization. When viewed without a polarizing filter, this light still appears white because our unaided eyes cannot detect the direction of polarization of light. However, when you look through a second polarizing filter, you see only the light that is vibrating in a direction that can pass through the filter. Only certain wavelengths or colors of light have the appropriate polarization. The intensity of the other colors in the light, which have different directions of vibration, is diminished. If a certain color of light has its polarization perpendicular to the axis of the polarizing filter, it is blocked out completely. (Think about the fence again. The rope waves won’t get through if they are vibrating perpendicular to the slats.) As you rotate the filter, each orientation of the rotated filter produces a different dominant color, as does each different depth of sugar solution.