From The Wall Street Journal:
Gorbachev deflected this question. He insisted that religion was not a serious problem in the Soviet Union. According to the notes, Gorbachev told Reagan that “he, himself, had been baptized, but he was not now a believer, and that reflected a certain evolution of Soviet society.” There might have been some “excesses” in repressing religion immediately after the Soviet revolution, Gorbachev said, but times had changed. His program of perestroika was designed to expand democratic procedures, and it would extend to religion. Reagan then ventured further, taking a step that quite a few Americans would have found objectionable. The president switched from seeking to persuade Gorbachev of the value of religious tolerance to promoting a belief in God. Reagan did so by telling one of his trademark stories. According to the notes of their meeting:
The president said he had a letter from the widow of a young World War II soldier. He was lying in a shell hole at midnight, awaiting an order to attack. He had never been a believer, because he had been told God did not exist. But as he looked up at the stars he voiced a prayer hoping that, if he died in battle, God would accept him. That piece of paper was found on the body of a young Russian soldier who was killed in that battle.
Gorbachev tried to switch the subject. Perhaps the United States and the Soviet Union might open the way for greater cooperation in space, he told the president. But the president wasn’t to be diverted. According to the transcript, Reagan told Gorbachev that space was in the direction of heaven, but not as close to heaven as some other things that they had been discussing.
As the meeting ended, Reagan became even more direct and personal. He noted that his own son Ron did not believe in God either. “The President concluded that there was one thing he had long yearned to do for his atheist son. He wanted to serve his son the perfect gourmet dinner, to have him enjoy the meal, and then to ask him if he believed there was a cook.”
*facepalm at the logic in the last sentence*