"The Bio-filter bacteria convert ammonia and nitrites into nitrates. Plants can use all three of those as their source for nitrogen. In fact, ammonia is the preferred nitrogen source for plants. If you add plants to a tank with an established bio-filter, the plants will actually use up some of the ammonia before the bacteria can convert it. That means that there will be less ammonia for the bacteria, so the bacteria colony will decrease in size. And since less ammonia is now being converted to nitrite, there will be less nitrite than before, so some of those bacteria will die off too.
"I recommend starting out with the plants doing the job of removing harmful ammonia. In order for this to work, you must ensure that the plants are growing and thriving before adding the fish.
"My plan for setting up a new planted tank involves setting up all the tank equipment, including CO2 and Lighting, then adding plants, and giving them several weeks to get established before adding any fish. During those several weeks, the plants will get their roots established, use up any nutrients already present in the water (and begin using substrate fertlizers provided), but the algae will starve, since you aren't adding any fish food, and there is no fish waste for those couple weeks. This lets the plants get a head-start on the algae, and ensures a beautiful algae-free tank."