I am sharing a portion from Les Miserables about the difference Cosette made in Valjean's life.
Valjean was teaching her to read and it sometimes occurred to him, as he listened to her spell out the words, that when he had taught himself to read in prison it had been with the idea of putting it to nefarious use. Instead of which, he was passing it on to a child. This brought a singularly gentle smile to his lips, and it led into wide fields of speculations. He had a sense that it was a foreordained, that he was serving the purpose of a Being higher than man. To teach Cosette to read, to help her to be happy, this was becoming the mainspring of his life. He talked to her about her mother and taught her to say her prayers. She called him 'father', never any other name.
This is a personal opinion, but to be wholly frank we must say that we can see no certainty that Jean Valjean, at the point he had reached when he came to love Cosette, would have been able to continue on the path of virtue without that moral support. He had been confronted by new aspects of the malice of men and the sufferings of society, limited aspects depicting any one side of the truth--the lot of women summed up in Fantine, public authority embodied in Javert. He had been sent back to prison, this time for a good deed. Renewed bitterness had assailed him, disgust and weariness, to the point that even the sacred memory of the bishop was perhaps at moments eclipsed. It must certainly have been reborn later, luminous and triumphant, but at that state it was greatly diminished. Who can be sure the Jean Valjean had not been on the verge of losing heart and giving up the struggle? In loving he recovered his strength. But the truth is that he was no less vulnerable than Cosette. He protected her and she sustained him. Thanks to him she could go forward into life, and thanks to her he could continue virtuous. He was the child's support and she his mainstay. Sublime, unfathomable marvel of the balance of destiny!My sufferings in this world may not compare to Valjean's, but I do know that how I react to the situations in my life are being watched by my children and I have to stop and make the choice to react and do the right thing. I personally can't attribute this to the 'balance of destiny', but rather through the 'sublime, unfathomable' ways of God!