There is so much to say about building placement that this topic will no doubt come back in several later Tips of the Day (the advice can get a lot more specific for each race, of course, but even match-up to match-up specific building placement can cover whole Tips of the Day). That being said, there are still some very common tips for building placement that are span all races.
- Don’t place important upgrade structures where they can easily be sniped. This includes Engineering Bays, Tech labs, and Armories for Terran; Evolution Chambers, and Lair/Hive for Zerg; Forges, Twilight Council, and Cybernetics Core for Protoss. If these your upgrades get sniped at any point in the game, you can be set drastically behind in the upgrade war and lose the game soon after. Place them tucked away near your main or natural mineral line where a drop or army is least likely to attack your base.
- Centralize your important tech structures so that they do not get sniped as well. Any tech that you need to rely on in order to win the game should be safely in your natural or tucked away in your main but still be open enough for you to produce the unit and have it reach the army without waiting too long for it to find a hole through the maze in your main base.
- Place spotting buildings (Pylons, Overlords, Supply Depots) around the tip of your base so that you can see when Medivacs, Mutalisks, or Warp Prisms come in the second they show up on your mini-map. Having a little extra reaction time never hurt anyone.
Again, there are A LOT more things to say about building placement, so stay tuned for more information in future Tips of the Day.