Tropico 5 is all about taking care of your citizens. You want them to keep happy, because happy people won’t overthrow their government in a restless rage. One of the most important parts of your people’s happiness is their housing quality.
Housing quality is brought up by the houses you build around town; for help with that, check out our in-depth guide over here!
As for where you should build houses, the answer is simple: where ever there are shacks and near places of employment. Shacks will let you know where people need to live, as they’re taking up drastic means to set up their lives there, so it’s a good idea to replace shacks with legitimate housing.
If you have, let’s say, a mine that’s far off from the rest of your civilization, you’ll want to set up some housing there so that your people don’t have to walk far to get home. Basically, just keep in mind what your people are already telling you by where they build their shacks and how far their commute is.