The lawsuit involves churches, synagogues, and other religious groups, accounting for millions of American worshippers.