For the ball to be tracked
The ball is the part of the controller that gives the PlayStation an indication where the controller is. The lights on the ball are crucial for location detection.
To make it more visible
In case the lighting in your room changes, the PlayStation might find it harder to locate the controller and so the color of the ball might be changed to make it easier to detect.
To avoid pixel conflict
The PlayStation eye looks at pixels. If there are nearby pixels of the same color, the color of the ball must be changed for the PlayStation to be able to detect it.
To account for changes in light settings
If the room you are in is brightly lit, the light on the bulb will change so that the PlayStation is able to detect it. (See Why Playstation 4 is good?)
To create proper contrast
The color of the PlayStation move controller will change to create proper contrast so that the controller can be easily located if the surroundings have similar colors.
It can’t be changed manually
Because the colors change to support the functionality of the move controllers, they can’t be changed manually. They can be altered, however, by changing the lighting settings or even the wall color. (See Why PlayStation VR is Bad?)
The game requests it
The game can request a change in color of the controller so that detection of the controller happens in a better way.
Why does the PlayStation move controller change color?
How do I change the move controllers colour? How can I change the orb colour on the PS3 motion controller?