An Ultra Violet (UV) steriliser will kill Cyanobacteria if the bacteria passes through the UV unit. However, a UV steriliser will not make any difference to blue green algae (Cyanobacteria) that is growing on rocks, plants or ornaments in water.
Ultra Violet light from the sun won't affect Cyanobacteria either unless the bacteria is left out in the sun to dry out. Then it's a combination of drying and UV light that kills it.
Having a UV light above the tank will not help kill Cyanobacteria in an aquarium but will contribute to people in the house, and the fish being more likely to develop cataracts and skin cancer.