Diatoms are not green. They do not have chlorophyll. They do not do photosynthesis. They are chemosynthetic. Light has nothing to do with them. They come from silicate which is introduced when you set up your tank with city or well water. Eventually they go away on there own. Not sure why but I suspect micro organisms eat it or it starves and dies. Once the silicate becomes the diatom it cannot be released as silicate again and is out of the picture. If you want a fun way to get rid of them fast I highly recommend this guy.
Tropical Fish for Freshwater Aquariums: Otocinclus Catfish
Just buy one and give him a week. He is a brown Diatom eating machine