Social Morality

He is a good person , He is a bad person.

How do we define who is good or bad ? is following the law your country tells you to provent the ”crime” and chaos make you moral person ? or just a person who afraid of punishment

What if some laws are immoral ? what do you do then ?.