President Trump has been a regular speaker at recent Values Voter Summits, and for this year’s event, he will send Vice President Mike Pence to rally the religious right. This will not surprise many people on the left who have questioned the authenticity of social conservatives’ values and their place in the Trump-Pence coalition. They think the religious right has compromised its Christian values in order to attain political power for Republicans.

But new data suggest the left may have a lot more common ground with some of these conservatives than it thinks. In a Democracy Fund Voter Study Group report, I found that religious conservatives are far more supportive of diversity and immigration than secular conservatives. Religion appears to actually be moderating conservative attitudes, particularly on some of the most polarizing issues of our time: race, immigration and identity.

Churchgoing Trump voters have more favorable feelings toward African-Americans, Hispanics, Asians, Jews, Muslims and immigrants compared with nonreligious Trump voters. This holds up even while accounting for demographic factors like education and race.

Churchgoing Trump voters care far more than nonreligious ones about racial equality (67 percent versus 49 percent) and reducing poverty (42 percent versus 23 percent). These differences are reflected in their actions, too. Mr. Trump’s most religiously observant voters are three times as likely as secular Trump voters to volunteer — and not just with their own church. Sixty-one percent of the president’s most devout base volunteered in the past year compared with 20 percent of conservatives without religious affiliation.

Religious participation also appears to pull Mr. Trump’s supporters away from the administration’s immigration policy. The more frequently Trump voters attend church, the more they support offering citizenship to unauthorized immigrants and making the immigration process easier, and the more opposed they become to the border wall.

In fact, many conservative Christian churches disapprove of the Trump administration’s handling of immigration. The National Association of Evangelicals, representing 45,000 churches, asked President Trump to end family separation at the border because it caused “traumatic effects” on young children. It also urged the administration to “resume a robust U.S. refugee resettlement program.”

The Southern Baptist Convention, the largest Protestant denomination in the country at over 15 million people, did something similar: It passed a resolution asking the Trump administration to consider a pathway to citizenship for asylum seekers and keeping families together at the border because of the “biblical mandate to act compassionately toward those who are in need.”

The Mormon Church issued a news release voicing its concern over the “aggressive and insensitive treatment” of asylum seekers that was “harmful to families” and urged officials to “correct this situation” with “rational compassionate solutions.”

It seems church teachings can curb tribalistic impulses by regularly reminding worshipers that we are all God’s children. This hasn’t extended to sexual minorities as much as progressives may like, but it appears to be making a difference when it comes to race and immigration.

Religious institutions also provide communities and identities that aren’t based upon immutable traits such as race or country of birth. Research suggests that identities that transcend race or nationality may lead people to feel more favorably toward racial and religious minorities.

Social psychology research has also found that conservatives have a stronger desire to belong and be loyal to cohesive groups. Secular conservatives lack church membership to provide that sense of belonging and may succumb to the temptation to find it on the basis of their race or the nation, thereby bolstering white nationalism or the alt-right movement. We found that secular Trump voters are three times as likely as churchgoing Trump voters to say that their white racial identity is “extremely” important to them; a majority of them report feeling like strangers in the country.

These effects aren’t confined to just Protestants or Catholics (who make up 63 percent and 26 percent, respectively, of Mr. Trump’s devout supporters). Frequent participation in religious traditions also appears to bolster more tolerant attitudes and volunteer work among Muslims, Mormons and Buddhists.

But the harmonizing effect of religion may be diminishing. Since the early 1990s, as record numbers of Americans began leaving organized religion, the percentage of white Republicans with no religious affiliation has tripled, according to an analysis of the General Social Survey. Today, only 31 percent of the president’s coalition attends church regularly. Forty-eight percent never or rarely attend services.

Some on the left might applaud such trends. Because of the L.G.B.T. culture wars, many incorrectly assume that if conservative churchgoers are less accepting of sexual minorities, they are also less accepting of racial and religious minorities. This may help explain why a majority (56 percent) of Democrats today have outright negative views of evangelical Christians, as the Views of the Electorate Research Survey found.

Many progressives hope that encouraging conservatives to disengage from religion will make them more tolerant. But if the data serve as any guide, doing so may in fact make it even harder for left and right to meet in a more compassionate middle.