Abū Hurairah relates that the Holy Prophet (peace and blessings of Allah be to him) said: “A person who calls people towards doing good deeds will get the same reward as those who follow him and do good; and nothing will be diminished from the requital of the latter. Similarly, those who call the people towards vice will have the same punishment as those who follow him without any diminution in the punishment of the perpetrators.”
No deed can be both good and evil. And people, in given circumstances, are tempted to do either good or bad deed. This hadith gives good tidings to a person who not only does good deeds but invites others to do so. It also warns a person against inviting others to vice.
Calling people towards doing good deeds is a virtuous act. It wins the pleasure of Allah as well as provides an opportunity for the invitee to do good deeds. While the act of inviting people to commit some evil is a vicious act. It earns the Divine wrath.
God is All-Powerful. He can give reward and likewise can award punishment, here on earth and in the hereafter as well, to whom He wills. But this does not mean His judgement is baseless. He knows perfectly well the deeds done by His servants as well as the intention lurking behind the commission of the deed. Hence His judgement is based on human actions. He however can forgive whomsoever He wills. This hadith encourages the believers to call people towards doing good deeds.