I don't think that campaigning by candidates in churches is, as churches were also the town assembly hall in the old days. I do think that church clergy campaigning for a specific candidate or issue, while also not illegal, does affect the church's tax exempt status if they are excessive about it.
It's the chuch's choice: be politically activist and give up tax exemption, or stay tax exempt and remain politically neutral.
-PJ