What makes an act good or bad, right or wrong, just or unjust?
In his Existentialism is a Humanism, Jean-Paul Sartre related a tale told by one of one of his pupils. As a teenager during World War II, the student lived alone with his mother, his father having left the family as a Nazi collaborator and his brother having been killed in 1940. He had a choice to make ― to go and fight with the Free French to avenge his brother and protect his nation, or to stay and be his mother's only consolation. So he was confronted by two options; one concrete and immediate, but directed only towards one single individual; the other addressed to an infinitely greater end but very ambiguous. What should the student have chosen to do? How ought he to have weighed the competing goods facing him? What was the right thing to do given his situation? What could he have done so that a just end could have been achieved?
This is one of those all-time great questions that everybody has to think about at least once in their lifetime.
How does one define "good" and "bad?" This is hard because it is so subjective. What is "good" for one person might very well be "bad" for another (think about a man getting a lung transplant at the expense of another man who has been hit by a bus.) In a more abstract sense it is the "loggers versus the tree-huggers" argument. Which is the greater "good"...jobs or owls? An act is "good" if it has a positive effect for the individual performing the action, and bad if it has a detrimental effect.
The interesting thing is that "right and wrong" sound the same as "good and bad," but there are some subtle differences. Whereas good/bad does not always have to do with morality, right/wrong always appeals to a moral code. That code may come from the traditions of a society, from a god, or a personal invention. How do you know if what you are doing is right or wrong? You have to check your action against one of these moral codes. You may not always get agreement (especially when in a different cultural group) out of the people around you, but as an individual you must decide how your action conforms to (or goes against) the moral code you have chosen to hold it up against. For example is this old gem: is it right to steal if your family is starving? Depending on whose code you use you will get different answers.
Lastly comes "just and unjust." This is another variation but it has more to do with fairness and justification of your actions. Think about killing the man who killed your wife/husband. Is this a good/bad action? Hard to say what the emotional/physical consequences of this action might be and whether the satisfaction would be worth it. Is it right/wrong? That depends on what mirror you hold it up against. Culturally, that answer will be different around the world. Lastly, is it just/unjust? I think a good number of people would declare it as "just" because of the "eye-for-an-eye" mentality, but in the eyes of the law it is not (unless, ironically, it is the state that is doing the killing.)
So, as you can see, the answer to your question depends a lot upon what standard you are holding the action up against: your own, society's, God's, etc...there is no one final answer for that question on a human scale.