Most believe that the casque aids in hydration. It can help channel the water towards the mouth so it is easier to drink. Most likely it helps males attract females and also show dominance over other males.
So as you can see here, it is a thin bone that is attached to the rest of the skull. It contains some fat and muscle and if a chameleon is overfed you could see this in a very thick looking casque.
So the muscles in the casque are actually part of the jaw function. Now I know why Zaphod drew blood when he accidentally mistaked my finger for a hornworm... He did have a big head!