The color changing in bearded dragons is very cool. My dragons can change their black stripes to blue-gray and vary the amount of orange and yellow showing, as well as bearding. This color change is made by cells in their skin called chromatophores that contain bits of color. They have separate kinds of chromatophores for each of these three colors: black/dark brown, yellow, and red/orange.
The change process is called translocation and is somewhat like each cell spreading out or pulling together bits of color inside to make the color seem more or less obvious. Translocation is controlled by neurotransmitters (brain chemicals) so excitement, mood, light, and temperature can all affect the coloration.
One example of how brain chemicals control color is melatonin. Melatonin is a neurotransmitter (brain chemical) that is produced in the pineal gland in response to changes to light in dragons and people. The pineal gland is in the middle of the brain. In bearded dragons, this process is controlled by the parietal eye (the odd looking scale that is clear on top of the dragon's head). The parietal eye sends signals directly into the dragon's pineal gland through an opening in its skull in response to changes in light.
Melatonin is one of the neurotransmitters that can affect translocation in chromatophores, changing the dragon's color. Less light makes more melatonin. More melatonin makes the dragon feel sleepy when it acts on its brain. More melatonin makes the dark color in cells draw together so it shows less. So the dragon has less dark color when it is asleep in the dark.
Here is a link to an article about chromatophores:http://en.wikipedia.org/wiki/Chromatophore
Here is a link to some cool animations of a bearded dragon skull:http://digimorph.org/specimens/Pogona_vitticeps/
Look for 3D Volume Rendered Movies, Skeleton only, and click on Pitch underneath. It shows the little opening in the top of the skull where the parietal eye passes its information to the brain.