Giving charity to the 'wrong' person is still the right thing to do. Remember this hadith the next time you fear your sadaqah will be spent only on things like alcohol or cigarettes:
Abu Hurayrah reported Allah's Apostle (may peace be upon him) as saying: ‘A man expressed his intention to give charity, so he came out with charity and placed it in the hand of an adulteress. In the morning, the people were talking and saying: “Charity was given to an adulteress last night.” He (the giver of Sadaqa) said: “O Allah, to Thee be the praise – to an adulteress.”[Editor: Even though logically the story has no problem when compared to what the Quran says, I think it is more likely that Prophet Muhammad (peace be upon him) was making a point by telling people about these possible scenarios. We know that in the Quran angels only appear to prophets (and their relatives), and the story doesn't say this man was one. But of course it is possible that this man was the prophet of a past nation.]
He then again expressed his intention to give charity; so he went out with the charity and placed it in the hand of a rich person. In the morning the people were talking and saying: “Charity was given to a rich person.” He (the giver of charity) said: “O Allah, to Thee be the praise – to a well-to-do person.”
He then expressed his intention to give charity, so he went out with charity and placed it in the hand of a thief. In the morning, the people were talking and saying: “Charity was given to a thief.” So (one of the persons) said: “O Allah, to Thee be the praise (what a misfortune it is that charity has been given to) the adulteress, to a rich person, to a thief!”
There came (the angel to him [the giver of charity]) and he was told: “Your charity has been accepted. As for the adulteress (the charity might become the means) whereby she might restrain herself from fornication. The rich man might perhaps learn a lesson and spend from what Allah has given him, and the thief might thereby refrain from committing theft.”’
-- Found in both Sahih Bukhari and Sahih Muslim.
Source : http://www.quranclub.net
When giving charity is the right thing to do: