Your team really needs to be on the same page with stuff like this but when is it the right call to do one or the other?
You should focus someone who is building "Glass Cannon." These are the people that have nothing but damage items and no survivability. Next, you should try to kill the people who can lock up your team with stuns and the like. Lastly, focus the tanks, which should almost ALWAYS be last.
If you catch someone out then by all means throw some damage at them, but the priority in a fight is to kill the carry or "glass cannon" as they deal the highest damage. If you cant do this, then your team may be in a bad position or is on the back foot.
Basically focus on the carry/glass cannon,if your target flashes out/runs away DONT CHASE, I REPEAT DONT CHASE,this will just let you get picked off as you follow. If the target does get away then simply change target, try and peel of the champs attacking your other carry/support etc.
90% of the time,its the AD's job to just attack the closest person (Prioritizing non tanks). The tank/brusiers job is to peel off the damage, and the ap's job to burst someone.
Focus should always go away from the tank, unless you have the tank 100% separated from the group. Don't ever waste an ult, or even more then 1 cd on the tank. If you can get the tank inside your circle, while the tank and brusiers keep everyone from collapsing, that is when you target the tank. For the most part, your team will engage, and target the weakest person first. Usually they go for the ad carry, until he flashes, or they go for the AP carry if they have more kills.
The best way to know who to attack, is to look at two things. Who has the most kills/cs and who has the most tanking items/abilities, and who has the most aoe. There are always high priority targets. Kennen, karthus, morgana. They all deal great AOE damage. Take them down before they can kill your entire team. Even if Kennen is behind. A full ult will still lower your entire teams health.
If there are no high priority ult targets. Aim for the person with the most kills, UNLESS its a tank. Never target champions that have more health then everyone else. Targets that are more then 2 levels higher then you. Or targets that have massive defensive items. I've seen multiple games lost because they targeted the ww with frozen heart. He has too much defensive items and too much lifesteal. Go for the champions that can't survive your burst. Getting it to a 4v5, means you can beat the guy who is more defensive.
What's your role?
The AD carry or the AP carry, must stay as far as possible from the eye of the storm, if you go in melee range you're probably dead in 2 seconds.
As you can't go too near, try the squishiest nearby target. BUT if your team is protecting you (asthey should), then you can try reach they AD/AP carry. If they have more than one, focus on the "glass cannon" (The one who deals tons of damage, but does not have defense at all). Try to save your Exhaust/Ignite + burst damage for them.
The tank's responsibility is to protect their carries/attack the enemy carry. When you are chasing your opponent carry, you can be letting your entire team fall. So stay close, at the same time, attack the enemy carries. Again, focus on the "glass cannon".
Your task is simple but also vital. You need to mess with the opponent. Polymorph their "glass cannon" so your team can finish him without any deaths. Stun their entire team or just the other support or even their tank. You need to think very carefully and fast. Make life and death decisions. You are there to make your team survive the encounter. Stay as far back as possible, you don't need to attack the opponent, you only need to avoid them to attack you and your team. Buffing, shielding and even healing your team is also your task.
Who should I focus the most?
You should focus the closest target to you the most , UNLESS the opponents have someone that can almost solo your team (aka "glass cannon").
The "glass cannon" usually comes in last, waiting until your team is fully engaged in a 5v4 fight. You must stop attacking the opponent and focus on him as soon as he appears close to you.
So I'll put this order.
Remember some of these other "rules". This should help your judgment.
Should I EVER change this order? When should I change it?
Yes you should! You change this order depending on the enemy formation. Sometimes, the support is ruining all your strategies so badly that it is better finish him BEFORE the glass cannon (you'll notice that sometimes, after this, the enemy team just falls apart). Or even go for the AP carry first (killing the Karthus while he is casting his Requiem is a good way to avoid a huge amount of damage to your entire team).
Remember this formula is relative to your condition. If your team has a good CC (e.g. Fiddle + Alistar) you can CC the opponent carry and support and kill the tank first (this is a very, very VERY rare case).
Again, use your judgment in this question.