Title VII of the federal Civil Rights Act generally bars employers from discriminating based on religion, but exempts religious discrimination by any "religious corporation, association, educational institution, or society." Those terms, however, aren't precisely defined, and while they create plenty of black and white zones, there's also a good deal of gray area. Leboon v. Lancaster Jewish Community Center Ass'n, a Third Circuit decision filed last week, explores this as to a Jewish Community Center; the Center had a substantial religious component to its activities, but was not under control of any particular synagogue or rabbinical organization. The two-judge majority said the Center was a religious organization covered by the exemption. One dissenter held the contrary, and would have read the statutory exemption as limited to "only those entities that ... are controlled by a religious sect."
Note that there's a separate doctrine, developed under the First Amendment, that allows discrimination based not only on religion but also race, sex, and the like, but that's limited to ministers and other employees with distinctively religious jobs. We're talking here about the categorical statutory exemption -- though only from the ban on discrimination based on religion -- of all employees of religious corporations, associations, educational institutions, or societies.