If your going to do a black out to try to control algae, you want the tank and sump completely dark as in no light at all. This means you cover the tank and sump with something like blankets or cardboard, so light doesn't get in at all.
You generally want to maintain this condition for 3 day. No peaking! Your corals will be fine. They are often in shipping containers that long. This method will take care of some kinds of algae, but not all.
I do NOT recommend the method mentioned by Newjack, of just turning the lights off for a day, and then one day normal. Just too much light gets in, and that's just enough to keep the algae going.