Religion seems to be one of the terms which everyone uses and everyone understands (on some level) but, when it comes to setting down a formal definition, no one knows quite what to do. However, no study of religion can proceed very far without at least some attempt to arrive at a definition.
Academic literature is filled with attempts to describe what religion is and many of those attempts are very unhelpful. Definitions of religion tend to suffer from one of two problems: they are either too narrow and exclude many of the belief systems which most people will agree are religious, or they are too vague and ambiguous, leading one to conclude that just about any and everything is actually a religion.
When it comes to the academic study of religion, such problems are fatal. If the definition is too narrow, students will miss much of what they should be studying. A good example of this is the common attempt to define "religion" as "belief in God," effectively excluding polytheistic religions and atheistic religions while including theists who have no religious belief system.
On the other hand, if the definition is too broad, students will lack direction and structure - never really getting to the topic they are trying to focus on. A good example of that is the tendency by some to simply define "religion" as "worldview" - but how can every worldview qualify as a religion? Some define religion as concern with "the sacred," but since that immediately raises the question of "What is sacred?" such a definition needs work.
Some have argued that religion isn't actually hard to define - in fact, the plethora of conflicting definitions is cited as evidence of just how easy it is to define religion. The problem, instead, lies in finding a definition which is empirically useful and empirically testable when it comes to real-life situations.
So far, the best definition of religion which I have seen can be found in The Encyclopedia of Philosophy. In the article on religion, it lists some characteristics of religions rather than simply declaring religion to be one thing or another. The more markers that are present in a belief system, the more"religious like" it is:
Belief in supernatural beings (gods).
A distinction between sacred and profane objects.
Ritual acts focused on sacred objects.
A moral code believed to be sanctioned by the gods.
Characteristically religious feelings (awe, sense of mystery, sense of guilt, adoration), which tend to be aroused in the presence of sacred objects and during the practice of ritual, and which are connected in idea with the gods.
Prayer and other forms of communication with gods.
A world view, or a general picture of the world as a whole and the place of the individual therein. This picture contains some specification of an over-all purpose or point of the world and an indication of how the individual fits into it.
A more or less total organization of one's life based on the world view.
A social group bound together by the above.
The above definition serves to capture much of what religion is even across diverse cultures. It includes sociological, psychological, and historical factors. Because it allows for broader gray areas in the concept of religion, I prefer it over more simplistic definitions we can find in basic dictionaries. Another advantage is that it includes many of the concepts discussed throughout the scholarly literature, uniting them in a handy, easy to understand way.
That is not to say that it is without its flaws, however. Notice how the first characteristic is about very general "supernatural beings" and gives "gods" as an example, but thereafter only talks about gods specifically. Even the concept of "supernatural beings" is perhaps a bit too specific; Mircea Eliade defined religion in reference to a focus on "the sacred," and it seems that it could be an appropriate replacement for "supernatural beings" because not every religion necessarily revolves around the supernatural (although that is rather common). Thus, a more comprehensive definition might look like this:
Belief in something sacred (for example, gods or other supernatural beings).
A distinction between sacred and profane objects.
Ritual acts focused on sacred objects.
A moral code believed to have a sacred or supernatural basis.
Characteristically religious feelings (awe, sense of mystery, sense of guilt, adoration), which tend to be aroused in the presence of sacred objects and during the practice of ritual.
Prayer and other forms of communication with the supernatural.
A world view, or a general picture of the world as a whole and the place of the individual therein. This picture contains some specification of an over-all purpose or point of the world and an indication of how the individual fits into it.
A more or less total organization of one's life based on the world view.
A social group bound together by the above