Diatoms are not harmful, they produce much of the oxygen we breathe on Earth. Almost all aquariums go through a bloom during the nutrient cycling/maturation stages.
They bloom when the environment is favorable for them.
Give the tank time/be patient. They'll go away on their own.
That may be due to a combination of factors, mostly likely-
-changing parameters/nutrient balances, or
-predation and/or being out-competed by other organisms such as other algae, sponges, tunicates, bacteria, etc.
If you just can't stand them, try turning off the lights or doing water changes being sure to use DI or RO/DI water.
Make sure you have an efficient skimmer and stable calcium levels (these work in harmony).