The main character runs a virtual reality business. A man comes to him and want him to create a simulation of heaven. He says that he wants people to experience it so that they would be better people in hopes of getting there for real. The guy builds it, but begins to suspect that the man's motive are somewhat less altruistic. Give the people the ability to experience heaven and they might be less likely to "behave" themselves as they can get the experience, albeit not eternally, without doing so. This was a short story, not a novel. Probably read twenty years ago.
I can't seem to find a full synopsis of the book, but could it be
Virtual Heaven by Taylor Kole?
The mysterious tech firm Broumgard pioneers a new form of virtual reality that mirrors, even exceeds, real life. Before long, people are dying to escape their humdrum lives for the virtual ecstasy of the Lobby. Literally.
When the world discovers that dying while connected to the Lobby might mean an eternity in virtual heaven, people are willing to do anything to get inside.
This is mentioned in the short story Party Line by Clifford D. Simak, though it's not a man running a VR company. It's a research group working on advanced physics. The relevant section of the story is:
But Mary Kay and Jennie—Christ, they’re into something that is beyond anything we ever bargained for. Mary Kay a simulation—or maybe even the actuality—of a heavenly existence, a sort of Paradise, and Jennie with overtones of an existence beyond the grave. These are the kinds of things that people have been yearning for since the world began. This is what made billions of people, over the ages, tolerate religions. It poses a problem—both of them pose problems.”
“If something came of either of them,” said Allen, “what would we do with it?”
“That’s right. Yet, you can’t go chicken on it. You can’t just turn it off because you’re afraid of it.”
“You’re afraid of it, Paul?”
“I guess I am. Not personally. Personally, like everyone else, I would like to know. But can you imagine what would happen if we dumped it on the world?”
“I think I can. A sweep of unrealistic euphoria. New cults rising and we have more cults than we can handle now. A disruptive, perhaps a destructive impact on society.”
“So what do we do? It’s something we may have to face.”
“We play it by ear,” said Allen. “We make a decision when we have to. As project manager, you can control what comes out of here. Which may make Ben Russell unhappy, but something like this business of Mary Kay and Jennie is precisely why the director was given that kind of authority.”
But this is a relatively small part of the story. The story is set in the future where humans are communicating with aliens (by a FTL communicator, not in person) and trying to work out how to deal with them.