There is a Halachic obligation for Kohanim to recite the Birkat Kohanim (priestly blessing) in the synagogue. However, the Shulhan Aruch (Orah Haim 128) lists certain Kohanim who are disqualified from reciting this Beracha. One example is a Kohen who violates the marriage restrictions that apply to Kohanim, such as by marrying a divorcee. A Kohen who marries a divorcee desecrates his priestly status, and thus forfeits his right to recite the Beracha. (He may recite the Beracha after divorcing his wife and performing Teshuba.) Likewise, a Kohen who murdered may not recite Birkat Kohanim. (This disqualification is subject to numerous details, which will not be discussed here.) Another example is a Kohen who drank wine and is in a state of inebriation; he may not recite Birkat Kohanim in such a condition. Additionally, a Kohen with an unusual voice or some abnormality on his hands that would distract the congregation should not recite Birkat Kohanim. (It should be noted that in Talmudic times, Kohanim did not cover their hands while reciting the Beracha, and thus abnormalities on the hands would cause a distraction.) A Mumar – one who abandoned the Jewish faith – is also disqualified from reciting Birkat Kohanim (though according to some authorities, he may do so if he returns to Jewish practice and repents).
There is some discussion among the Halachic authorities concerning the status of a Kohen who publicly desecrates Shabbat. The Shulhan Aruch does not address the question of whether such a Kohen may recite Birkat Kohanim, but this issue is discussed by Hacham David Yosef, in Halacha Berura (vol. 6, p. 475). He writes that in principle, since Shabbat desecration is akin to idolatry, a willful Shabbat violator should have the status of somebody who abandoned Jewish faith, and should thus be disqualified from Birkat Kohanim. In practice, however, Shabbat desecrators today are generally people who violate the Shabbat not out of a firm, theological rejection of the Torah, but out of ignorance, as they were not given a proper religious upbringing or education. And the fact that they are present in the synagogue testifies to the fact that they are not "idolaters." In light of this, and in the interest of avoiding friction and acrimony among Jews, there is certainly room to allow a Kohen who does not observe Shabbat to recite Birkat Kohanim. Hacham David writes that if such a Kohen would ask whether he may recite Birkat Kohanim, he should be respectfully advised to do Teshuba and embrace Shabbat observance. But if he goes to recite Birkat Kohanim without asking the question, he may be allowed to do so and no protest should be made, in order to avoid conflict. This applies even if he is the only Kohen in the synagogue. (This ruling is based on Hacham Ovadia Yosef’s Yabia Omer, vol. 7, Orah Haim 15:3.)
Regarding Kohanim who violate other Torah laws, the Shulhan Aruch writes explicitly (128:38) that even if he is a known Torah violator, he is allowed to recite Birkat Kohanim. The Rambam (Rabbi Moshe Maimonides, Spain-Egypt, 1135-1204), in Hilchot Tefila (15:6-7; listen to audio recording for precise citation), explains that Birkat Kohanim is a Misva, and we certainly would not cause a sinful person to commit more sins by preventing him from performing Misvot. For example, nobody would imagine instructing a non-observant Jew who wishes to put on Tefillin in the morning not to do so. The Rambam adds that if one asks what value the blessing given by a sinner has, the answer is simple – the blessing is granted by G-d, not the Kohen. The Torah writes explicitly about the priestly blessing, "Ve’samu Et Shemi Al Beneh Yisrael Va’ani Abarechem" – "They shall place My Name upon Beneh Yisrael, and I will bless them." G-d says He will bless Beneh Yisrael via the Kohanim, and there is no reason why Hashem cannot bless His people through a Kohen who does not observe the Misvot.
Accordingly, Hacham David Yosef rules (p. 478, Se’if Katan 310), based on earlier sources, that even if a Kohen intentionally commits grave transgressions involving Arayot (illicit relations), he is nevertheless allowed to recite Birkat Kohanim, even he has not repented from his wrongdoing. The only exception, as noted above, is a Kohen who violates the priestly marital code by marrying a divorcee. But a Kohen who transgresses the other marital laws, even if he marries a Mamzeret, is qualified for Birkat Kohanim. Hacham David cites this ruling from the Sefer Ha’eshkol, Maharam Mei’Rutenberg, and other Halachic authorities.
Summary: Generally speaking, a Kohen who is not Torah observant is allowed to recite Birkat Kohanim. The exceptions are a Kohen who committed murder, a Kohen who abandoned the Jewish faith altogether, and a Kohen who violates the laws of Kohanim by marrying a divorcee.