Even as groups of the religious right are campaigning for prayer in the public schools, US courts are holding the line on separation of church and state. The latest development comes from Alabama where a federal appeals court has declared the state's voluntary school prayer law unconstitutional. It also rebuked a judge in Mobile for contradicting the US Supreme Court on the issue.
It was an agnostic parent who brought the suit, claiming that teachers were unlawfully leading prayers in his children's classes. The 1982 Alabama law suggested nondenominational prayers, but the 11th US Circuit Court of Appeals said in a unanimous opinion: ''The primary effect of prayer is the advancement of one's religious beliefs. It acknowledges the existence of a Supreme Being. The involvement of the Mobile County school system in such activity involves the state in advancing the affairs of religion.'' It was also argued that passage of the law had been motivated by religious considerations and was intended to advance religious beliefs.
The ruling deals a blow to supporters of a proposed constitutional amendment to permit voluntary prayer in the classrooms - an amendment strongly supported by President Reagan. But it will be welcomed by Americans United for Separation of Church and State and those members of the public who, even though deeply religious themselves, think that the way to preserve freedom of religion is to observe the constitutional ban against any law that either establishes religion or prohibits the free exercise of it.
It is not a matter of outlawing prayer in the schools, for children are always free to pray silently whenever they want, wherever they are. It is a matter of the state, i.e., a public school system, not mandating a religious-like practice - such as a ''moment of silence'' - which often seeks to foster a specific religious denomination and thus violates the right of every citizen to believe what he will or not believe at all (as in the Alabama case).
Perhaps if churches and families did a better job of teaching the moral and spiritual values needed in society, there would be less pressure to involve the public schools and the present controversy would not be raging.