I kinda think @noseless answered most of your question.
Light grows algae, waste fertilizes algae,
bad lighting grows more brown algae, especially especially if it's on for hours.
If you don't have live plants, you don't need light at all; maybe just a couple hours around the time you are usually looking at the tank.
If you overfeed, stop it.
If you overclean the filter, stop it.
Use a gravel vacuum, but don't change too much water; 30% usually enough.
If you have too many fish or they're too big, do something about it.
And stop overfeeding. (No, I didn't forget I said that already)
I haven't used an undergravel in 30 years. But you have to have enough overall filtration; if you don't, then keep it.
And stop overfeeding (crap, did it again, still on purpose though)