Religion was very important on both sides of the struggle for civil rights in the United States in the 1950s and 1960s. People on both sides felt that God supported their ideals.
Segregationists in the South typically believed that God had mandated racial separation. They felt God had created separate races on purpose and that he did not want those races to mix. For this reason, there was some degree of religious fervor on the part of the anti-civil rights forces.
Much more famously, the Civil Rights Movement was based very much on religion. This was true in at least two ways. African American churches were even stronger in those days than they are now. They formed the most important social institution in the black community and were a powerful source of organization. Second, they were the source of leadership. Since the church was so important I the black community, it was natural that much of the leadership of the movement would come from churches. Martin Luther King, Jr. was, of course, the most important of these leaders. However, he was part of a larger group called the Southern Christian Leadership Conference, which was the most important organization in the Civil Rights Movement.
Thus, religion motivated both sides of the civil rights struggle. Its role in promoting civil rights is much more famous, though, than its role on the opposing side.