Rabbi Dr. Asher Meir has a column on taking donations from unscrupilous individuals:
…There are many problems involved in accepting donations from unscrupulous individuals.
In the worst case, the donation money itself is stolen or otherwise tainted. In this case, the organization directly benefits from the crime and attains a kind of complicity. (1)
Another common problem with these donations is chanufa, often translated as flattery. By honoring a person who is identified with sinful behavior, your organization would almost certainly be seen as condoning his actions. The Talmud severely criticizes some prominent rabbis who tried to reassure King Aggripas that his rule was kosher, despite the fact that he attained the kingship in an illegitimate way. (2)
…[I]t does seem like an attractive option to accept the money without making the donation public. However, this attractiveness is illusory. There are two reasons you should avoid this route:
1. By accepting the money in a surreptitious way, you seem to get the best of both worlds - obtaining the money in a legitimate way yet avoiding controversy. Actually, you get the worst of both worlds. Since you accept the money in a quiet way, people will assume the donor is unworthy. So you have been complicit in tainting his name. Yet you have still accepted the money. So people will assume that your organization is condoning wrongdoing.
2. Giving recognition to donors is a basic ethical obligation. The prominent medieval authority Rabbi Shlomo Adret writes that honoring donors is not just a gesture to their vanity; it is a mitzvah in and of itself to give honor to those who perform good deeds - including giving charity. By giving in to public pressure you will be falling short of this obligation and simultaneously denying a deserved honor from the donor. (3) …
SOURCES: (1) Shulchan Arukh Choshen Mishpat 356:1. (2) Sota 41b. (3) Responsa Rashba 582, cited in Rema's glosses on Shulchan Arukh Yoreh Deah 249:13.
Of course, the haredi world largely ignores these halakhot. Yeshivot and other haredi organizations regularly take money from from convicted felons, stock swindlers and other assorted theives. Chabad-Lubavitch even elevated one such donor-felon to president of the Crown Heights Community Council.