Random values changing each frame
Setup a material similar to the following :



The 'Animate' Value should be keyframed to start at 0 and increase to change the colours - the faster this changes, the faster they will animate. The Color Ramp can be adjusted to change the sequence of colors or you could use a different interpolation if you want gradual changes rather than 'Constant'. The Power node uses the 'Random' value to add some variation to the flashing - so that some of the objects change at a different rate. Set the Power to 0 and they should all change at the same rate - or experiment with other Maths nodes to get the desired spread (eg, an 'Add 1.0' node in place of Power would allow you to set the rate to range from 1.0 to 2.0 so you'd never get really slow changing ones).

Results as shown :



Blend file attached