Original: They can change colour rapidly and the primary purpose of colour change is for communication with other chameleons and for controlling body temperature by changing to dark colours to absorb heat.
Simplified: The main reason for colour change is for communication with other chameleons and for controlling body temperature. By changing to dark colours, their bodies absorb heat.