Macroalgae is kept in a refugium separate from the main tank. The macroalgae takes up nitrates and phosphates that otherwise would be used to fuel nuisance algae outbreaks in your display tank. The refugium with macroalgae also serves as a breeding ground for pods, which is live coral and fish food. The pods grow in the fuge because there aren't any predators in there, and eventually there are enough of them to spill out into the main tank, feeding your animals.
So a light isn't necessary if you only have rock. However, it is necessary if you are going to keep macroalgae. But for bacteria only, no.