good question . . . I have had occasional mild bouts of algae, but in general it has not been a big problem. I really don't know that I'm doing anything special, but it is a heavily planted 12G nano, with anubias, java fern and cryptocoryne. only inhabitants are a male betta and two otocinclus cats (and some very small snails)
the cats certainly help with some of the algae, and I do 20% weekly water changes and use Prime and Flourish Excel, both of which supposedly have some effects on algae
one thing I have heard you could add that might help are nerite snails; supposedly, these will eat a variety of algaes . . . I haven't seem them in any LFS that I've tried