When should I focus my units' fire?
Solution 1:
Focus fire is critical for sniping injured units and for taking down important or high DPS units like void rays, ghosts, brood lords, immortals etc...
But beyond that, it actually worse to focus fire units. Using this awesome map, I have actually tested micro battles with and without focus fire. I have found that 9/10 times any group of units I micro to focus fire just flat out lose to non-micro'd units.
There are two problems with naive use of focus fire. 1) Targeting one unit will most likely cause you to over-kill the unit, which is a waste when you could be shooting at another target. and 2) If your unit is not in perfect range of the target, the unit will bumble around until they are, which means instead of attacking, they are bumbling around.
Solution 2:
A lot of times at the beginning of a battle you want to focus fire units that are more of a threat the longer they're allowed to live. Siege Tanks and Void Rays are good examples of this. You need to take down a Void Ray before it can get fully charged because it becomes so devastating, and Siege Tanks just deal so much damage anyway. Against Carriers, a lot of times it's important to focus the carrier rather than the interceptors because the AI will not always do that for you.
One time when you definitely don't want to focus fire is when some of the units you selected are out of range of the target unit. For example, if you're using Zealots, only a couple Zealots can manage to find a position to get hits in on any given unit unless you get a complete surround, which doesn't generally happen in army vs. army battles. Also, even with ranged units, a lot of times many are out of range of a specific target and have no path to get within range, so they will dance uselessly if you focus their fire on that target. It's always better to have every unit dealing damage somewhere during a battle rather than watching.
One specific time to definitely focus fire is if your opponent starts to retreat. Make sure to pick off his weak units before he's able to get fully out of the battle so it costs more for him to replace his army. This is even a decent strategy during the battle as well, as that removes one of his sources of DPS. If you see a unit getting low, try to finish it off.
Solution 3:
As stated before regarding focus fire and when you should do it, I'd like to add that you should always move into an engagement with attack move (keyboard short cut 'A' + left click on map). Generally speaking, your micro would be better spent on moving a unit taking damage out of a fight rather than focusing its fire. This will force your opponents AI to target a new unit. If you do this consistently you will lose fewer units vs. your opponent.
A good way to do this is to hold down alt so you can see all the unit health bars, select the one taking damage and click (not attack move) out of battle. If your units are stalkers, blink individual units out of range. If you're Zerg, burrow individual units taking damage (unless a detector unit is present then move them out).
This strategy will help you win a battle even with a weaker army. It will definitely take some practice before you start seeing positive results.