|MadSci Network: Zoology|
According to The American Egg Board,
The color comes from pigments in the outer layer of the shell and may range in various breeds from white to deep brown. The breed of hen determines the color of the shell. Breeds with white feathers and ear lobes lay white eggs; breeds with red feathers and ear lobes lay brown eggs. White eggs are most in demand among American buyers. In some parts of the country, however, particularly in New England, brown shells are preferred. The Rhode Island Red, New Hampshire and Plymouth Rock are breeds that lay brown eggs. Since brown-egg layers are slightly larger birds and require more food, brown eggs are usually more expensive than white.
The pigment is secreted by the uterine glands late in the shell formation. When newly laid eggs are still wet, the pigment is easily rubbed off.
Try the links in the MadSci Library for more information on Zoology.