So let's say you attack your opponent's main base and eliminate his defenses but you're left with 5 or 6 units. You have 10-15 seconds before he brings his army back and destroys what's left of your force. Which structures should you try to destroy to make the most damage possible? He also retreated his workers and you don't have enough time to destroy the Command Center/Nexus/Hatchery.
Depends a bit on the race... but I'd say destroy tech structures relevant to his army. "Oh shit his muta harass is hurting me bad" -> kill the spire. "Oh shit I hate banshees" --> kill tech labs and/or starports. "Oh shit 4 gate is so strongggggg" -> try to power down his buildings. Also if he's heavy on stalkers, sniping the cybercore can be nice b/c you can't build stalkers w/o one. (Or snipe cybercore + robo... can't rebuild the latter w/o the former.)
Another possibility is if you see research structures doing research, you can kill the building & halt the research. This is kinda hit or miss in terms of usefulness b/c it's hard to tell what research you're halting; but if you snipe a robo bay right before thermal lance finishes, that's very, very good for you.
Last but not least, supply buildings are always a good target.
The common theme in these suggestions is to damage the thing(s) that 1) guarantee damage (you don't want to start attacking something only to have your army die & that thing is still standing); 2) cost your opponent time (if he's supply blocked, he can't build units for a while = time lost; if you kill his hydra den, you don't have to worry about hydras for a little bit, etc)
That said, you also need to evaluate the possibility of retreat. Can you destroy enough buildings to justify losing what's left of your attacking force? Like if I have 8 marines left, I could maybe take out a pylon or two... but that's not necessarily worth 8 marines. Or maybe I have time to kill one tech lab & get away scot free, but if I kill the starport, all my units die. Probably not worth killing the starport. You have to make that judgement call.