The level of happiness in Mars determines how many colonists can potentially live in your colony. However, it will be the resources that define how many colonists can actually remain. You can have a lot of happiness, but at the end of a turn, if you lack a particular resource, it could affect whether the colonists stay or not in your colony.