男的、 女的 are more colloquial. We often use them in informal situation when you refer to a man or woman, usually aldults. Just like what you say:后边那个男的挺帅的。it's the same meaning as: 后边那个人挺帅的。but the former points the gender.
In formal occasions or some top grade places, we do not use them. They are a little bit impolite and using them shows kind of disrespect. In formal occasions, like meetings or ceremonies, we use 先生、女士. It's more elengant.
But it's ok to use them in daily life. People use them quite often.