Several ways.
One way would be a reasoned reflection on human nature.
Another way would be to look to Divine Revelation.
Yet another way would be to look to sociological evidence. If a particular activity has a tendency to rot society, like contraception, abortion, euthanasia, pornography, spousal abuse, rape, etc., etc., it’s probably bad.
Still another way would be the much more subjective appeal to the conscience. If you have guilty knowledge (not necessarily guilty feelings – there’s a difference), the chances are that you’re right. And, needless to say, Divine Revelation is always right.
I’m sure there are more ways, but these are a few off the top of my head. If you go through a few of these and find overlapping confirmation, chances are you’re on solid ground.
In my experience, people seldom have difficulty knowing what’s wrong. Unfortunately, what’s wrong to do is often what’s most expedient, and people as a whole love taking the easy road. I like to call that ‘concupiscence’ – you may call it what you will.
God Bless,
RyanL