The human eye achieves an impressive dynamic range, automatically adjusting for the lighting conditions so we can see in very bright light as well as in gloomy locations. The eye and brain in partnership can also correct colour casts so that a white piece of paper, for example, is perceived as white, regardless of the ambient light.
Unfortunately, digital cameras are not so clever. They record the scene as they see it, within their limitations. This is why, in tricky lighting conditions, we have to set the white balance to ensure the result we want. It is also why we sometimes have to tell the camera the colour temperature of the light falling onto the scene.
What does this mean? In simple terms, light is made up of the three primary colours − red, green and blue. In theory, an equal intensity of all three produces white light, but in practice these colours are present in different proportions in light from different sources. For example, tungsten-filament lights produce illumination with more red than fluorescent lights, which create greener light. Of course, natural light also varies according to the conditions, so that colours appear warmer (more red) at sunset and cooler (more blue) at midday. This varying proportion of colours can be expressed as the colour temperature, which is measured on the Kelvin scale (more about this shortly).
If you are shooting images in any format other than RAW, the camera will post-process the image to make the colours in the scene as accurate as possible. However, this is not always as easy as it seems − the colour temperature of the light falling onto the scene affects the way the camera sees the colours and, unlike our brains, it does not automatically correct it. For example, with no correction, a white wall photographed under tungsten lighting will appear very yellow, and under a fluorescent light will look very green. This is why all digital EOS cameras have the option to set the white balance to suit the ambient light.
If you shoot RAW files, you have complete control over colour in post-processing, so the white balance need not concern you at the time the exposure is made, although it can be useful to get things close to the final image because this will enable you to properly assess the images you're capturing.