Quoted By:
A physics person better at optics could probably give you a better guess, but my speculation is that by cycling they can better broadcast their location. Think about it: if there was competition between two genes, one that shone blue light and one that shone red light, and they both had advantages in certain scenarios, a mutation that showed both blue and red could certainly be beneficial. The fact that it cycles through the spectrum to do so might just be a product of existing biological structures, or it might also be beneficial in its own way in that environment. If anything, this is a case where evolution seems like the only reasonable explanation.