Records can be anywhere and while church records seem like they should be housed in churches or church related facilities, that is not always the case. As you research make sure to do a thorough search of libraries, archives and museums that cover the region your ancestor lived in.
Case in point, the Online Archive of California (OAC). This union catalog of various institutions in California holds many different church records, along with other great stuff. Now, I should also say that not everything here documents only California. These are the records of institutions in California, but they can be and are of various places. One of the unique record sets is Polish Catholic Church Records from the Hoover Institution.
Do a search on the word "church" and you will see over 2,000 results that include actual church records from the 19th century to the 20th century. Unique records include those from the Japanese internment camps, San Francisco's Chinatown, images, postcards, church bulletins and records amassed after the People's Temple murder/suicides.
You can also search by the name of the denomination or religion. A search on the word "Jewish" returned over 1,000 items.
The OAC catalog allows you to narrow your search once it is conducted, by institution and date. Some items in the catalog are digitized and available to view online while others must be researched in person.