Fiqh-us-Sunnah Volume 3, Zakaat and Fasting, Fiqh 3.078.
Zakah is given to a Muslim provided he is eligible to receive it. Whether he is good or sinful does not matter. If, however, it is known that he will use it to perpetuate what Allah has forbidden, it should be denied to him. It is preferable that one who pays zakah should give it to the pious, the knowledgeable, and those of kind disposition. It is related from Abu Sa’id al-Khudri that the Prophet, upon whom be peace, said: “The likeness of a believer and the likeness of belief are similar to the horse that, tied to its post, walks around and then comes back to its post. The believer may forget, but he returns to his belief. Thus, give your food to the righteous people and entrust your favours to the believers.” This is related by Ahmad with a good chain and as-Suyuti authenticated it.
Ibn Taimiyyah says that the needy who discards his salah will not be given anything until he repents and offers salah again because neglecting salah is a grave sin. It is not right that one who commits this sin should be financially helped until he repents to Allah. Included along with those who neglect salah are offenders who are not ashamed to commit sinful acts and remain unrepentant. Also, one whose conscience is corrupted has an innate character which is distorted and a sense of good which is virtually dead. Such a person is not given zakah unless doing so will turn him in the right direction and help him reform.