It is advisable to wash and clean your tent after a long backpacking trip, especially if it has been exposed to sand, dirt, tree saps, and/or bird droppings. However, if you only use it for short trips, it could go on with a cleaning once every season.
Please keep in mind, though, to never machine-wash nor machine-dry your tent. A top-loader with an agitator can tear, stretch, and damage mesh, seams, and fabric. Using an industrial dryer could do more damage as it could also potentially melt the tent fabric.
You can clean your tent by using a non-abrasive sponge, cold water, and a non-detergent soap. Scrub the grimy areas with a light hand, and be extra careful on scrubbing the coated areas of the floor and the fly.
To ensure that your tent would maintain its quality for a longer time, make sure to avoid using household cleaners like harsh dish soaps, bleaches, spot cleaners, or other laundry items. Most of these household and laundry agents are perfumed with chemicals that could damage your tent‘s water repellant coating. Even worse, the perfume could attract small animals and insects like rodents, which could chew through the fabric.