In order to maintain their exemption from federal income taxes, churches and other religious organizations must comply with several requirements specified in section 501(c)(3) of the tax code. One of these requirements is that the organization not participate or intervene in any political campaign on behalf of (or in opposition to) any candidate for public office. Another requirement is that the organization not engage in substantial efforts to influence legislation.
Resource. The prohibition of lobbying and campaign activities by churches is addressed fully in R. Hammar, The Church and Clergy Tax Guide.