A digital camera sensor is a matrix of tiny red, green and blue filters. Each individual "pixel" on the sensor is actually only records one of these primary colors. The camera evaluates adjacent Red, Green and Blue pixels and assigns a combined RGB value to each of them when the file is created. That in part explains why digital images are not "razor" sharp out of the camera.
If the pixel is recording the sky the B channel will be stronger that the other two. How much more will depend on the hue of the sky. Same for any object which is predominantly Red or Green; one channel will be stronger. Secondary colors like yellow are created by equal parts of Red and Green, so if you shoot Daffodils in bright sunlight you will notice the R and G channels get maxed out much quicker than the blue.
For a correct exposure you want all the channels in all parts of the photo to be below the point they max out and loose detail. As a starting point you need to set the color balance of the camera to match the color of the light so when a bright white object is photographed all three channels will max out at exactly the same rate. That is referred to as setting the "White Balance" because white and all neutral gray tones are produced by a equal parts of Red, Green and Blue.
When the color balance is out of sync some odd things will happen to very colorful areas in the photo. For example if the white balance is too red and you shoot those Daffodils instead of the R and G channels maxing out at exactly the same the Red will blow out its detail first. The brightest parts of the flower will still be yellow, but they will look oddly flat and one dimensional and no amount of manipulation in editing will be able to fix it.
The advantage of shooting RAW is that the RGB balance can be adjusted during editing. It is still necessary to expose the file correctly -- so none of the channels are overexposed and blown out -- but the balance of RGB in the white and neutral tones can be easily corrected.
Gray Card - The Standard Benchmark for Color
The best photographic tool a photographer can own is a Gray Card. A commercial gray card is manufactured so it will reflect equal amounts of Red, Green and Blue. Cameras have "Custom WB" utility which uses a shot of the card to set the RGB balance in the camera so that whites and neutral grays will be equal parts RGB. When the card is include in a test shot its RGB values can be read and corrected in Photoshop.
For example if you shot under trees and the light was green, the gray card in the test shot will also be green and the RGB numbers and histogram will be higher in the green channel. Put if you click the card image with the middle eyedropper in Levels it will make the card -- and everything else in the photo -- normal. The flat dull gray skintones that occur when pink skin is recorded in green light will be restored their vibrant health look.
JPG vs RAW Capture
When you shoot JPG the camera "locks" any color bias and WB error into the file. It can still be corrected as described above using the eyedropper on the card in a test shot but image quality may suffer if the change is significant.
When shooting RAW the camera simply "tags" or attached the white balance settings from the camera in the header of the file. Photoshop and other editors use the header information to display the file with the camera WB settings but the actually camera data is still in its original "raw" state and can be manipulated without affecting image quality.
So to sum it up. Shoot in RAW mode. Get a gray card and learn to set custom WB and learn to recognize and avoid overexposure.
See Understanding Digital Exposure for my very simple "White Towel" method for gauging and controlling exposure in the camera.
Holistic Concepts for Lighting