Biologist: When bacteria of a particular species are placed in a test tube that has different areas lit with different colors of light, the bacteria move only into the areas lit with a particular shade of red  The bacteria contain chlorophyll, a chemical that allows them to produce energy more effectively from this color of light than from any other
This suggests that the bacteria detect this color of light by monitoring how much energy their chlorophyll is producing
There are species of bacteria that do not contain chlorophyll but do move into areas lit with particular colors when placed in a test tube lit with different colors in different places.