Segregation had nothing to do with religion, but yes, even then, in their own communities. Blacks and whites.
church was a place where the whole community gathered. You went, your kids went. Your neighbors went, their kids went. You shared values. You shared morals. Everyone knew each other, everyone felt obligated to look out for and do things for each other. Its just not like that anymore in most places.
I'm not a church goer, BTW. I just see that it was the basis for a good community, something we're sorely missing today.