It depends on who you are playing and how you build them. A tanky champ with spammable CC(Udyr, Olaf) should be stunning or snaring as many people as possible, for instance.
A quick answer is whatever you do well in lane, you will do well in a teamfight. Importantly, you need to do SOMETHING in a team fight. There is nothing more frustrating or useless than someone that just spins around during a team fight without using their abilities.
Additionally, don't worry too much about attacking tanks unless you are very mobile with a reliable gap closer that can get you into the back line(Nocturne, Irelia.) It is way worse to die out of position, having done nothing, than it is to kill a tank and get out safely.
There is a mob mentality in normals and low Elo that "ur bad" if you attack a tank. However, if their front line is impossible to get past without dying, it only makes sense to hit what you can. Still, be aware of which enemy is the best target. Often you will have a choice between two or sometimes three tanky champs. Pay attention during the game to who is least farmed and punish them in team fights.
As a ranged carry, be aware that the enemies gap closers will attempt to engage on you. If this happens, do your best to separate and try to kite towards someone that can peel them off if you.
AP carries should know their best combo and only employ their long CD cults when a team fight is truly engaged. Blowing Brands ult early, for instance, could allow the enemy team to retreat safely, heal up, and reengage on better terms.
If you're playing an initiator(Amumu, Malphite, etc.) you have to understand when the enemy is in a disadvantaged position and take advantage of it.
tl;dr: In a team fight, do whatever your champ does best when not in a team fight. They are often the same thing!
Best Answer
It depends who you are playing against, but it's mostly meant to be used defensively.
One of the primary uses is to blow away enemies that jump onto your carries, basically granting your team a fight reset with (ideally) the enemies' initiates being down.
The other main use is to rescue allies who get caught. As Janna, you usually have more movespeed than most, and a damage absorbing shield, so can blast the ult and then quickly escape yourself.
A more offensive use, which requires more skill to pull off, involves jumping into the middle of enemies (usually flash, but a good thresh lantern pull can work really well), and blasting a squishy target back into the middle of your team to be shredded. This is often fatal, so is best suited to removing the threat of a very fed carry.
A less dangerous version of this one often presents itself in-lane as a support, right around when you hit six. A Howling Gale from the bush followed by a Zephyr can get you in a good position to Monsoon an enemy back into your ADC, or burn Flash to escape.
There are also situational uses, like disrupting the ults of Warwick, Kat, etc., or blasting a Crowstorming Fiddle out of your team.
Incomplete list of good abilities to defend against:
Galio's Idol of Durand (if you can get the timing, you can blast him away with minimal taunt, very hard to do)
Nunu's Absolute Zero
Warwick's Infinite Duress
Fiddlesticks' Crowstorm (doesn't stop the ult, but does save your team a lot of damage), Drain (less common, as it is a single-target, and has a short cd)
Katarina's Death Lotus
Kennen's Slicing Maelstrom (again, doesn't stop the ult, but saves your team a lot of damage)
Malzahar's Nether Grasp
Morgana's Soul Shackles (breaking the chain by knocking her out can save a full team stun)
Nocturne's Unspeakable Horror