Do state and local governments have to allow private clubs and religious organizations to discriminate?
That depends on what they do. Many states and localities have Civil Rights Laws that are far broader than the Federal law and try to define, in economic terms, what is and is not a "private club". For example, New York City defines private clubs that derive certain levels of income from business as places of public accommodation for purposes of its Civil Rights Laws. San Francisco requires employers who do business with the city to offer their employees health insurance for non-marital "partners".
States and localities often seek to exclude organizations that discriminate from certain benefits. For example, municipal governments might try to sever relationships with a discriminatory organization, as some have with the Boy Scouts, denying the organization the use of public buildings to hold meetings, or removing it from the list of public charities eligible for the payroll deduction. Of course, there are limits beyond which a state or local government can not go when an organization is engaging in constitutionally protected activity. For example, even a racist hate organization has a First Amendment right to march and a state or city can not deny such an organization a permit because the organization discriminates against minorities or its speech is bigoted and hateful.