algae prospers when high nitrates and phosphates are present, so you should test for both of those. If you have any of the two, you should do water changes to lower the nitrates and use a phosphate sponge to lower the phosphates. It also sounds like you do not have enough water flowing across your sandbed. You should have a constant current across the top of your sandbed as well (close enough to flow across it, but far enough so it doesn't disturb it...). This will keep things from settling on your sandbed, including algaes.
Do you use tap water? If so, you should stop immediately and start using RO water.