Chao can put various things on their heads. Hats used to serve no purpose on DC aside from looks, but in SA2B it gives the Chao more defence in Chao Karate. Unfortunately it also reduces the Chao's speed.
There is no way to remove a hat after the Chao has put it on, unless you
a) jump on the Chao
b) throw the Chao against the wall
Chao will supposedly take the mask off on their own when they're tired of it,
but I've never seen that happen. Be aware of this issue.
If you have trouble removing a hat from your Chao, check to make sure you don't already have eight items in the garden: eggshells, different hats, etc. If you have eight items in the garden you cannot get any more. Either sell some of your hats, or make another Chao wear one.
Chao can wear eggshells as a hat. If you bought a Chao egg from Black Market and didn't sell the shell, you can give to a Chao and he'll put it on. Some say that if a Chao reincarnates twice while wearing the eggshell, he will become an egg Chao like the ones in the Challenge Race. I believe this is a myth.
If you use Knuckles or Rouge in the garden, try digging. They will sometimes unearth a pumpkin in the Neutral or Hero Garden, or a skull in the Dark Garden! These can also be given to a Chao to wear.
The following can be bought from Black Market:
Huge Apple (2000 rings)
Cardboard Box (2000 rings)
Pan (2000 rings)
Paper Bag (4000 rings)
Tin Can (4000 rings )
Tree Stump (4000 rings)
Bucket (6000 rings)
Flower Pot (6000 rings)
Watermelon (6000 rings)
Red Wool Hat (8000 rings)
Blue Wool Hat (10000 rings)
Black Wool Hat (20000 rings)
I don't know their exact effects, but I assume the more expensive, the better.