“It’s a beautiful day in this neighborhood, a beautiful day for a neighbor,” Mr. Rogers sang. “Would you be mine? Could you be mine?”

The cardigan-clad host of one of PBS’s most popular children’s programs may have been onto something, a study released last month suggests. Researchers at the Robert Wood Johnson Clinical Scholars Program at Yale University found that the more closely knit people reported their neighborhood to be, the less exposure to violence they had. By collecting data from roughly 150 New Haven residents through community-based surveys conducted in 2014, the study authors concluded that strong social ties may help reduce gun violence and produce more resilient neighborhoods.

“Gun violence is a chronic, man-made disaster,” said Dr. Brita Roy, one of the lead researchers. “Not only does a single act of violence involve the perpetrator and victim, but also the entire community bears the burden and the trauma of the event. When that is reiterated over and over again, there becomes this level of stress within these communities that undermines the wellbeing of their members.”

Although the study was specific to a single city in Connecticut with historically high crime rates, it illustrates the importance of social cohesion, or a community’s willingness to cooperate in order to prosper. The concept may sound mawkish in theory, but it has far-reaching empirical benefits. And these matter at a time when the national conversation about gun violence has seen renewed fervor.

“We certainly hope that our work in New Haven will have greater application,” Roy said. “Although New Haven is small, it definitely has common urban problems. For the people living in these neighborhoods, violent crime has become the norm; I don’t think we have a misrepresentative sample.”

In the Yale study, New Haven residents were asked to fill out a survey of 55 questions pertaining to their experiences of violence and community engagement. Ultimately, the participants expressed interest in having more communal events and programs for youth, refurbishing abandoned homes and yards, and improving relationships with the police, said Dr. Carley Riley, another lead researcher on the Yale team. Such activities could improve the community’s ability to prevent and recover from gun violence, because they help to forge trust and cooperation among residents.

Notably, the majority of people surveyed knew none or few of their neighbors, and almost all had heard gun shots at some point. Two-thirds of them had a family member or friend hurt by an act of violence, with roughly 60 percent of the survey participants reporting that one of their loved ones had been killed.

Nonetheless, defining and measuring social cohesion can be challenging—even a U.N. report from 2010 described it as a “quasi-concept.” But it’s no leap in logic to suggest that the closer people in a community are to one another, the more resilient they will be in the face of violence.

Along similar lines, proponents of social cohesion often focus on areas affected by earthquakes and hurricanes for research: As Emma Green has pointed out, “it helps to like your neighbor during a natural disaster.” The basic logic here is that trust among residents makes way for more efficient recoveries. Thus, close social ties are no less vital in poor communities than in rich ones—and in fact, may be even more key to getting the members of poor communities back on their feet after incidents of gun violence.

Natural disasters aren’t acts of crime, but they have many of the same effects on communities. So it makes sense that social cohesion would help alleviate the problems resulting from both. A 2006 paper based on data from over 10,000 respondents across 20 local areas found that crime decreased as “sense of community” increased. That metric was defined as whether people worked together to improve their neighborhoods, felt safe walking at night, and trusted their neighbors.

Likewise, a 2013 study funded by the U.S. Department of Justice characterized community bonds as a resource of, by, and for the people. “Residents living in neighborhoods with close social ties tend to watch out for each other and their property,” it stated. “Intervening can include things like calling the police, asking questions of strangers, notifying parents if children are misbehaving, forming community groups to address problems, or attending city council meetings to request assistant from government.”

This is not an entirely new concept. In Bowling Alone, the sociologist Robert Putnam argued that even affluent areas have seen decreased social interaction in recent decades. By combing through thousands of interviews from the last half of the 20th century as well as publically available data, Putnam found that Americans had joined fewer civic organizations, socialized with friends less frequently, and signed fewer petitions. The title of the book came from the fact that while Americans had bowled more in the preceding twenty years than ever before, fewer of them did so in leagues (instead they “bowled alone”). Putnam concluded that the United States was bleeding social capital, and therefore democratic values.

These findings may sound saccharine to the cynical ear: ‘Go bowling with your neighbors and peace will prevail.’ After all, the theory doesn’t hold water everywhere: A 2006 study of social cohesion in Brazil found no significant correlation between greater cohesion among residents and lower levels of crime. It also reported that lower-income neighborhoods had higher levels of social cohesion, unlike findings for many neighborhoods in the United States.

Still, research like the study conducted in New Haven reflects what sociologists call “collective efficacy,” or the ability of community members to achieve common goals and preserve shared values. Two separate studies in a much more populous city—Chicago—found that greater collective efficacy correlated with less violence of various forms. The more recent one, published in 2011 and also funded by the Justice Department, demonstrated “a direct connection between collective efficacy and rates of homicide and rape from 1995 through 2004.”

For Dr. Roy and her colleagues, however, much work remains to be done to reduce urban gun violence; creating neighborly ties is just one piece of the larger solution.

“Anecdotally, when we showed the surveyors themselves the numbers, they were disheartened but they weren’t really surprised,” she explained. “This was their day-to-day; this is what they’re living in.”