This is a great question. The boy is one of the main symbols of hope. Let me give you a few examples for this. First, the way the father speaks of the boy is filled with religious overtones. He says things like: "If he is not the word of God, then God never spoke." The boy in a sense is the embodiment of God. He is the hope for humanity.
The boy also gives a sense of hope to the readers, because in him we see that humanity is not totally depraved. There is still goodness. We see in him innocence. For example, he gives food to the the old man on the side of the road - something that we might not even do today. But in a post-apocalyptic setting, this is unheard of and humanity at its best. In a word, there is hope for a better world.
Finally, there is a powerful imagery of "carrying the flame." This, too, is a symbol of hope. On account of the boy, the father is able to move on and endure. He is his hope. After the father dies, the boy is that flame. By this point, we the reader can hope that all is not lost.