Recently I had a brief but fascinating discussion with someone who made me reflect on the question in the title of this post. The answer to the question above depends on: (1) the object chosen; (2) the end in view or the intention; and (3) the circumstances of the action.
The first element refers to the object chosen by the will. For example, to choose to give money to a poor beggar is a good object. The second element highlights the fact that the intention with which a person performs an act is distinct from the object chosen by the will. The same object can be chosen with a good or bad intention. For example, I can choose to give money to a poor beggar to relieve his suffering, or I can choose to give money in order to be publicly praised for my act. The former is good; the latter is evil. A bad intention can make an act bad that is in itself good. But, a good intention can never make an intrinsically evil act good. The third element--the circumstances of an act--do not change the nature of an act from bad to good or vice versa, but they can contribute to increasing or decreasing the essential good or evil of a human act. For example, if I steal money from a poor beggar who has no food, it is worse that stealing money from a rich person (cf. "Woe to those who cause little ones to stumble"). Circumstances can also either diminish or increase one's responsibility for an act. For example, extreme pain sometimes leads a person to say or do things he would not otherwise say or do if his will had not been overridden in some measure by suffering.
Any one of the above elements alone is enough to make an act evil, but one alone is not enough to make it good. All three are necessary to make any act good. The right thing must be done, for the right reason, in the right way.
We often oversimplify or overemphasize one element or another and downplay the others to our detriment. If we overemphasize the objective act, we may end in a form of legalism. If we overemphasize the intention, we may end in a form of subjectivism. If we overemphasize changing circumstances, we may end in a form of relativism.
This is all unoriginal and reasonably simple moral reasoning, requiring no great intelligence to practice. But, I never cease to be stunned at the virtual absence of moral reasoning among moderns. More often than not, I find that most cannot maintain focus long enough to think their way through the process above. Our educational system no longer even offers the tools necessary (i.e., reading, writing, thinking) for such an exercise. And think of the results--the almost universal inability to discern good acts from bad acts. No wonder there is little difference these days between Democrats and Republicans.