There will probably be a few algal blooms after the initial nitrogen cycle takes place. Fortunately wtih diatoms, they feed exclusively on silicates, so once their food source is used up they die off. In a new setup, I think silicates come from some slight "off-gassing" of the glass, maybe a bit in the substrate, new plastics, etc. Most of the time their food supply is quite short, and they'll pass within a month (if not quicker). However, if you have poor source water (something other than RO/DI that has silicates in it) or chose to use silica sand, diatoms can become more of a battle.
From there, it's not surprising to have a hair algae outbreak. This algae will consume some of the built up wastes in the substrate (usually rock) that wasnt removed through skimming or water changes during the initial cycle. Again, here, if you can keep the food source limited, it'll eventually die off. However, you have to be careful of your husbandry so that you don't over-introduce more wastes, or the algae may start to thrive. Depending on the quality of substrate used, hair algae will usually disappear after the first 3-4 months of setting up the tank. If it hasnt, you need to re-evaluate your habits of cleaning the tank.