Being Good Ourselves
To command good and forbid evil we first have to be one whom is doing good and staying away from evil. We have to be totally dedicated to the Quran and Sunnah and act only in accordance with the Quran and Sunnah.
Another way to ensure we have this quality is to associate with good company (friends).
Muhammad (S) said (what means), "A person is likely to follow the faith of his friend, so look whom you befriend." (Abu Dawood and at-Tirmidhee) He (S) also said (what means) "The example of a good companion and a bad companion is like that of the seller of musk, and the one who blows the blacksmith's bellows. So as for the seller of musk then either he will grant you some, or you buy some from him, or at least you enjoy a pleasant smell from him. As for the one who blows the blacksmith's bellows then either he will burn your clothes or you will get an offensive smell from him." (Bukhari and Muslim)
Muhammad (S) also told us we will be with those who we love in the Hereafter (Bukhari and Muslim). Keeping this in mind we should associate socially with people who will benefit us in our deen (religion) of Islam, or people who we are talking to about Islam.
How Should We Call to Good and Forbid Evil?
Muhammad (S) said (what means), "Whoever among you sees an offensive or evil act, he must change it with his hand, if he can not then (he must change it) with his tongue, if he can not then (he must feel it) with his heart, and that is the WEAKEST Iman (faith)." (Muslim)
We have to at least feel something in our hearts when we see something evil going on, otherwise we are not fulfilling an obligation of Islam, as Muhammad (S) told us to feel something bad in our heart is the weakest Iman. We can not be like those who watch and evil act, do not say anything, and who enjoy the act, then say, "Well, we did not do anything." Allah knows all that is in the hearts of people.
We should make sure when we make our call to good and forbid evil that we are not causing a greater evil. We should know the situation and judge from there. One thing we should be clear about; if we feel something happening is wrong and we are worried that our taking action will bring about a greater evil, then we have to feel bad in our hearts, and we should leave the activity taking place. Sometimes actions speak volumes.
If We Do Take An Action to Command Good and Forbid Evil, How Should We Do It?
With Knowledge: We need to first have knowledge of what we are talking about. We need to be able to tell the individual(s) why the action they are doing wrong by presenting evidences from the Quran and Sunnah. First, if we do give evidences then we should not expect that they will listen to us, and, secondly, we should know evidences for why we do things to make sure we are following Islam correctly.
With Gentleness: Muhammad (S) said (what means): "Gentleness does not exist in anything but it is beautified by it, and harshness does not exist in anything but it is marred by it. (Muslim) Muhammad (S) also said (what means): "Indeed Allah is Gentle, He loves gentleness in all matters. He gives through gentleness what He will not give through harshness." (Muslim)
This is a key point which many people, myself definitely included, need to work on. If I talk to a person in a mean and abrasive manner, then I will probably not get that person to stop their evil.
With Patience: Allah tells us (what means): "...And command good and forbid evil, and be patient with whatever afflicts you..." (Surah Luqman 31:17)
We might tell somebody something and, for some reason, they might not listen to our advice at first. In this case, we should still act in a nice manner with them, and keep patient. This was the style of Muhammad (S), and we can see some of his (S) worse enemies eventually accepted Islam.
This article did not give this subject its proper justice, but is hoped that it was beneficial somehow. Anything good in this is from Allah, and anything wrong is from myself.
References: "Fundamentals of Commanding Good & Forbidding Evil According to Ibn Taymiyyah", Al-Quran was Sunnah Society of North America, Second Edition, 1997. "Islam & The Concept of Friendship ", Isa Al-Bosnee