Cyanobacteria are found in huge numbers in water bodies or can form a slippery green film on rocks and pebbles.
The species used in the study, Synechocystis, is found naturally in freshwater lakes and rivers.
Cyanobacteria evolved around 2.7 billion years ago and the fact that they are able to produce oxygen and fix carbon dioxide using energy from the Sun - photosynthesis - is thought to have caused mass extinctions and the oldest known ice age.
The study from the Queen Mary University of London (QMUL) shows that they are able to do this because the cell body acts like a lens.
Also Read
As light hits the spherical surface, it refracts into a point on the other side of the cell. This triggers movement by the cell away from the focused spot.
Within minutes, the bacteria grow tiny tentacle-like structures called pili that reach out towards the light source. As they attach to the surface that they are on, they retract and pull the bacteria along.
"Our observation that bacteria are optical objects is pretty obvious with hindsight, but we never thought of it until we saw it," he said.
"And no-one else noticed it before either, despite the fact that scientists have been looking at bacteria under microscopes for the last 340 years," he said.
Synechocystis serves as a spherical lens but the researchers think that rod-shaped bacteria can also trap light and sense the direction it is coming from using refraction, acting like an optical fibre.
A Synechocystis cell is about half a billion times smaller than the human eye. As with the retina in the human eye, the image on the rear of the cell will be upside down.
But its resolution will be much lower, so only a blurred outline of any object can be perceived.
The study was published in the journal eLife.