The first most important moment in which religion influenced Jean Valjean's life relates to the Bishop of Digne's mercy and generosity. When Jean Valjean was finally released from prison after 19 years for stealing a loaf of bread for his seven starving nephews and nieces, he found that every place he went to in order to find food and lodging turned him out when they learned that he was an ex-convict. At one point he even tried to sleep in what turned out to be a dog's house but was turned out by the growling dog; he then declared in despair, "I am not even a dog!" (Vol. 1, Bk. 2, Ch. 1). The Bishop of Digne was the only one willing to accept him into his home, giving him dinner and a bed to sleep in. Not only that, he fed him using his best silver. Sadly, Valjean's primitive survival instincts drove him to steal the silver he had been presented with. When the police spied him with the silver, they returned him to the Bishop's home who said that Valjean had not stolen the silver, that it was a gift. He even asked Valjean why he had forgotten the candlesticks that he could "certainly get two hundred francs" for. The Bishop was doing two things by treating Valjean this way: 1) He was showing Valjean mercy for the first time in poor Valjean's life; 2) He was treating Valjean with compassion and giving him essential money he needed so that he can start a new life without being further suppressed by poverty and the law. As the Bishop of Digne phrases it, "It is your soul that I buy from you; I withdraw it from black thoughts and the spirit of perdition, and I give it to God" (Bk. 2, Ch. 12). The Bishop's mercy did indeed have a very redeeming effect on Valjean. After this moment, he became a new man, started his own factory, and dedicated his life towards showing generosity and compassion towards all.
Valjean has a second influential religious moment when he learns that a man named Champmathieu has been arrested and is being put on trial because the authorities have mistaken him for Jean Valjean. This put Valjean in quite a moral quandary. On the one hand, he is at peace for the first time in his life. He has become a completely changed man, dedicated to God and virtue. If he turns himself in by confessing himself to be Jean Valjean, he would lose everything he worked so hard for, including his freedom. However, he knows that, on the other hand, he cannot in good moral conscience have a man sentenced to prison for his own mistaken identity. As Hugo phrases it, after his encounter with God and the Bishop, Valjean had two thoughts, "to conceal his name and to sanctify his life; to escape men and to return to God" (Vol. 1, Bk. 7, Ch. 3). At this moment, his two fears collided, and he became forced to sacrifice his security and his identity for the sake of preserving his sanctity with God, making this second moment a very critical religious experience as well.
The first moment was when the Bishop of Digne showed him compassion and gave him a chance to change his life by telling officers that he had given Jean Valjean his silver. Valjean had, in fact, stolen it. In this moment, the bishop's actions made Valjean realize that must change and become an honest man.
The second moment was when another man was being charged with a crime he had committed in his past. Valjean was forced to search his soul and came to the conclusion that he must turn himself in to ensure this innocent man would go free.
Jean Valjeans is an ex-convinct who is struggling to redeem himself morally and gains acceptance from the human society who had branded and rejected him as a social outcast and put him in the bottom of the social hierarchy. It was the meeting with the Bishop of Digne, who accepts him for who is are and gives him a helping hand regardless of his criminal past that engulfs his entire life, even though he had tried to steal something from his household one day, learning the lesson of unconditional love that gives him a reason for living throughout this troubled times and suffered through all those trials and temptations that he had to face- the obstacle towards his success.
One of them was when the bishop of D___ shelters him gives him "unconditional love". I hope this helps :-)