Torah should matter in the concrete, daily lives of Jews, and therefore Torah must speak to political issues. Budgeting priorities, health care access and quality, legitimate grounds and tactics of war – these are precisely the types of issues that Judaism in particular cares deeply and has much to say about.
This remains true even when those issues become the subjects of partisan debate. If Democratic policies will fund the abortion of many late-term fetuses that would otherwise be born, and a rabbi sees late-term abortion as murder, how can s/he not say so? If Republican policies will deprive many people of their basic human dignity, how can a rabbi not say so?
It is true that political parties take positions on many, many issues, and individual politicians do not agree with all the positions of their party, so a religious claim that one must vote a particular way is always oversimplified. I think it is almost always wiser to discuss and weight the values involved and let listeners reach their own conclusions. But the job of a religious leader is to set priorities in complex circumstances.
It is also true that voting involves a judgment of consequences, not just of intent, and rabbis often have no particular qualifications to judge consequences. But neither do politicians, and in any case, all legal and moral decisions require judgments as to facts and consequences. We should train religious leaders to be expert in these areas, as much as or more as we train them to be expert at dealing with the emotional consequences of personal decisions. (Of course, rabbis, like everyone else, should avoid speaking out of ignorance, or lecturing the more informed.)
Nonetheless, pulpit discussions of partisan issues are often unwise, and even unfair if an expectation has been set otherwise. The Jewish religious community generally aggregates along ritual rather than ethical/political lines, and therefore it is practically necessary for rabbis to get along with members of both parties. Rabbis who talk primarily about politics, and in partisan fashion, will reasonably be suspected of imposing their ideologies on Torah rather than deriving them from Torah.
This does not mean that ritual is more important, or naturally a more appropriate topic for rabbis, than politics. Decisions to aggregate along ritual rather than theological grounds, or on ritual rather than Zionist grounds, do not require us to consider nusach hatefillah more important than the national existence of the Jewish people, or precise kashrut standards more important than precise standards of monotheism – they simply reflect practical judgments as to the best way of advancing our collective interests. I suspect that much American Jewish rhetoric on the subject of religion and politics is a product of IRS regulations and of our status as a minority religion.
Bottom line: Rabbis cannot, and congregants should not, see political issues as offlimits. Rabbis are wise to make such pronouncements sparingly, and with humility – they should make clear that even their wisest, most Torah-grounded judgments do not exclusively or unquestionably represent G-d’s true will. But they are entitled, and sometimes obligated, to vigorously seek to persuade their congregants to act in accordance with their best judgment as to G-d's true will, even when His will does not command a political consensus