That means they use sunlight, water and carbon dioxide to make their own food (glucose) and emit oxygen. As oxygen producers, diatoms are more important than all the rainforests, generating 20-50 % of the oxygen we breathe. Diatoms occur in virtually every aquatic and sub-aquatic environment, anywhere there is sufficient moisture (fresh or saline) and sunlight for photosynthesis. They are also a primary food source, contributing up to 40% of the global oceans primary production and feeding higher organisms across nearly all marine and freshwater habitats.