I think that religion is to give people something to strive for. I also think that it is there to give people comfort. It is easy to believe that if you lived your life as a good person, that you will be rewarded for it, and those who do wrong will pay for it.
I think that for some, it keeps them from being consumed with anger if they lost someone they loved, or if someone did something bad to them. I think that for some it is a lot easier to forgive someone who wronged them if they believe that in the end, that that person will get theirs. On the other side of the coin, it is comforting to believe that, in the end you will be rewarded for the good things you've done in your life or that you will see your loved one again someday after they have passed, as opposed to them just rotting in the ground, or that your good deeds will go unrewarded.
It is comforting to believe that no matter what you do, or the choices you make, good or bad, that you can still be forgiven, and that you are loved by someone up there when you are feeling alone.
I think that, in many respects, religion is a security blanket for those who don't want to face reality. I think that this can be seen in those who refuse to believe scientific facts. If you just say, that "God created us, and the planets" that that is easier than asking how we got here, and then spending your time trying to find out for yourself.
Especially since, once you find one thing, you will then have to question how that got here as well.. etc.. etc.. If you just say "God" and leave it at that, then that could be considered a cop out.