Q. Can a rabbi sue in the civil courts for unjust dismissal?
A. It depends on whether the rabbi is an employee. The English Court of Appeal decided in 1983 (President of the Methodist Conference v. Parfit) that in the absence of a contract of service a minister is not necessarily a servant of the church but a “servant of God”.
What rights that creates needs more discussion. If there is a contract, both parties are bound by it.
In Judaism there is a concept that after three years a rabbi is presumed to have chazakah, tenure, but if he and the congregation have a contract he is governed by it and can only complain if he claims the other party have breached their responsibilities.
Rabbinic contracts often specifically state that chazakah is excluded.
A rabbi who is guilty of serious misconduct can be dismissed even if he has no contract.