The world can be a cold place - as students we know that all too well.
All religions are based on one primary factor - faith. Whether it be in a person, a diety, several dieties, a 'force', 'THE force' (If you watch too much Star Wars), nature, or many others.
The reason for this in my opinion is that it is virtually impossible to have faith in humanity in it's current state. When an intelligent person can take a step back for a moment and look at the state of world affairs, the morals, ethics, bonds and similarities humans share, and how we repel eachother so much, or race towards eachother so quickly that we collide, metaphorically speaking, it's easy to lose faith in humanity.
Therefore, we establish our faith in a higher being or purpose. The majority of the human race seek purpose, a sense of belonging, or a desire to understand our origins or explain the paranormal. Some simply fear death therefore seek answers on what happens to us after our death - surely everything doesn't just turn black and we rot? One would hope not!
Thus, we seek to understand what lies beyond the grave. We seek to understand the universe. Some simply find the universe and all that be in it too much to grasp and understand, and simply place all their trust and faith in a higher being and turn to the book for answers.
Over 80% of the human race believe in one form of religion or another.