Either is technically correct. The primary difference is one is past tense and while the other is present tense.
In other words:
"Don't complain about the heat. It could have been hotter."
This sentence implies you've since left the hot room, as you're talking about it in the past tense. Rather if you use:
"Don't complain about the heat. It could be hotter."
This sentence is about the current conditions of the room you're in. It stands to reason that if you're complaining about the heat, it is because you're currently hot.
Of course that's just a logical interpretation. You could just as easily complain after having left the room.