Peter L. Berger, a sociologist and theologian who studied the role of religion in modern society, taught at schools including Boston University. (Fred Sway/Boston University Photo Services)

Peter L. Berger, a sociologist and theologian who saw signs of the divine in quotidian moments of everyday life and, in the thick of the 1960s “God is dead” movement, argued for religion’s continued relevance in modern society, died June 27 at his home in Brookline, Mass. He was 88.

Dr. Berger had a heart ailment, said a son, Thomas Berger.

The author of more than two dozen books, Dr. Berger was a professor emeritus of sociology, religion and theology at Boston University and a self-described snoop happy to learn from both prostitutes and priests.

“We could say that the sociologist, but for the grace of his academic title, is the man who must listen to gossip despite himself, who is tempted to look through keyholes, to read other people’s mail, to open closed cabinets,” he wrote in one of his earliest books, the popular 1963 introductory work “Invitation to Sociology.”

Dr. Berger, born into a Jewish family in Vienna, planned to become a Lutheran minister before turning to academia, where he spent much of his career bridging reason and faith and defying easy labels.

He organized academic conferences as well as Catholic intellectual debates for the Vatican; attended civil rights and antiwar demonstrations in the 1960s before becoming a leading neoconservative critic; and identified as a Lutheran while sometimes attending Anglican and Eastern Orthodox worship services.

His work focused on religion’s role in society but ranged widely to include studies on capitalism and Third World development. He believed capitalism and democracy were intrinsically linked, as were socialism and authoritarianism.

Dr. Berger also made major contributions to the field known as sociology of knowledge, which studies the ways in which society shapes human thought. H is 1966 book “The Social Construction of Reality,” co-written with Thomas Luckmann, was ranked No. 5 on a list of the 20th century’s most influential works of sociology by the International Sociological Association and was translated into more than 20 languages.

Beginning with a subsequent volume, “A Rumor of Angels: Modern Society and the Rediscovery of the Supernatural” (1969), Dr. Berger offered a rejoinder to the “God is dead” movement, a strain of radical theology united around the argument that religion had lost its force in modern society.

As Dr. Berger saw it, religious belief remained an intellectually valid way of understanding the world. He drew readers’ attention to what he saw as “signals of transcendence,” moments that pointed to an “otherness which lurks behind the fragile structures of everyday life.” Laughter, in particular, pointed to “the triumph of all human gestures of creative beauty over the gestures of destruction.”

That human beings were capable of laughing at all, in a world filled with such cruelty and malice that Dr. Berger and his family were driven from his childhood home, was to his mind a sign of human beings’ connection with a higher power.

Peter Ludwig Berger was born on March 17, 1929. His father ran a clothing store and was a cavalry officer in Austria-Hungary during World War I, and his mother was a homemaker who later crafted hand-painted jewelry.

The family converted to Christianity when Dr. Berger was a child and fled the country to escape Nazi persecution when Germany annexed Austria in 1938. They eventually settled in British Palestine, where Dr. Berger’s closest friends included Muslims, Jews and Catholic Christians — a religious mix that, according to his son, led Dr. Berger to develop a pluralistic sensibility at a young age.

He came to the United States shortly after World War II ended, and in 1949 he received a bachelor’s degree in philosophy from Wagner College in New York. His graduate studies at the New School for Social Research in Manhattan spoke to his range of interests: For his master’s degree in 1950, he produced a thesis on Puerto Rican Protestants in East Harlem; for his doctorate four years later, he focused on the Bahai movement in Iran.

He married Brigitte Kellner, a fellow sociologist, in 1959. She died in 2015.

Survivors include two sons, Michael Berger of Framingham, Mass., and Thomas Berger of Newton, Mass.; and two grandchildren.

Dr. Berger served in the Army for two years in the mid-1950s and taught at schools including Rutgers University and Boston College before landing at Boston University in 1981. Four years later, he founded that university’s Institute on Culture, Religion and World Affairs, where he served as director until 2009.

His later work was marked by a wholesale reversal: a belief that religion was not declining, dissolving into obscurity in an increasingly secular world, but was holding fast and even growing in some places, offering an increasing number of ways for human beings to find solace in a frightening world.

“Modernity is not characterized by the absence of God,” he wrote in a 2008 essay for the journal First Things, “but by the presence of many gods.”