Mold can be harmful to your health and damage the waterproof fabric of your tent. Mildew stains shouldn't necessarily be removed as it can damage fabrics. However, growth of mold should be stopped. It is best to consult your tent manufacturer documentation to know what's the best treatment for your specific product.
According to MSR's How do I prevent mildew?,
Mildew can permanently damage the waterproof coatings by causing them
to separate from the fabric, but mild to severe staining is more
common. Mildew stains are permanent. They cannot be removed without
potential harm to the fabric coatings
These suggested steps may very depending on the amount of mildew and type of product:
- Apply a treatment such as McNett MiraZyme or similar product.
- Mix 1 cup of salt and 1 cup of concentrated lemon juice with 1 gallon of hot water.
- Dry the tent in an area facing the sun
- Apply water resistant treatment
According to REI,
Lysol® also works, but its scent is attractive to bugs and critters
and is thus not recommended
This procedure is explained in more details in REI's Removing Mildew and Sierra Designs 5. What is mildew and how do I clean it off my tent? tent care sections of their respective websites.