Probably not in the sun 聴- but drying a tent thoroughly is, in my view, absolutely necessary. Even if stored loosely in a breathable bag, a damp tent is apt to mildew. And that’s bad 聴 mildew weakens the material, and of course smells.
I wouldn’t hang it in the sun because that can cause damage as well. UV radiation is murder on nylon, and can cause the fabric to weaken substantially. Tents are made to be used outdoors, of course, so some of that is inevitable. But keeping sun exposure to a reasonable minimum will increase a tent’s longevity.
Also, don’ try to get clever and toss the tent into a clothes dryer. That will cause the waterproof coating 聴- which is a coating, not part of the fabric 聴- to peel off like the skin of a shrimp. And that’s bad. Very bad.
My advice: Hang it in a dry, shaded place for a few days after it gets wet. Turn it a few times so that all the nooks and crannies dry out. Then, store it in a dry place, in a cotton or some other sort of breathable storage sack. Don’t stuff it into the little bag the tent came with -聴 use that just when hiking or biking with it.