A common debate among people in modern times, especially among westerners, is that Buddhism is not a religion -- but a philosophy or way of life. This of course, is something people are divided on and really depends on various technicalities in how one defines religion.
So what is the argument for Buddhism being a philosophy and what is the argument for Buddhism being a religion?
Arguments for Buddhism Being a Philosophy
Since Buddhism does actually have a clear belief system on the afterlife, I would say it is more than a "way of life" or "lifestyle" as some people say. However, calling Buddhism a philosophy is pretty accurate. One definition of philosophy from Dictionary.com is "the rational investigation of the truths and principles of being, knowledge, or conduct."
This is indeed something that fits into Buddhism very snugly. The Buddha's teachings are referred to as the Dhamma (or Dharma in Sanskrit), which literally means the ultimate truth or the truth about reality, and the Buddha encourages followers to investigate his teachings for themselves. One of the six qualities of the Dhamma is described as "Ehipassiko", meaning roughly "encouraging investigation" or "inviting to come and see for themselves." In the Kalama Sutta, the Buddha states that one should not believe in things simply because they hear it, it comes from their masters, is a part of tradition, etc.; but to investigate for themselves and if they find that:
"... these things are good; these things are not blamable; these things are praised by the wise; undertaken and observed, these things lead to benefit and happiness, enter on and abide in them".
Not to mention, the Buddha's teachings emphasized personal practice and adhering to moral principles above any kind of dogma. Even in regards to the Five Precepts, the Buddha doesn't describe them as divine laws, but as practical guidelines to follow for one's own happiness in this life and the next. Although he mentions karmic consequences if one chooses to break them, the Buddha provides practical benefits to following them also, such as "freedom from danger... animosity... suspicion," etc.
While the Buddha did discuss some metaphysical aspects of reality that people would often associate with religion, he made it clear that the most important aspect of Buddhism is how you practice, not what you know. A good example can be seen from the Cula-Malunkyovada Sutta, where the monk Venerable Malunkyaputta asks the Buddha a series of metaphysical questions such as whether:
"The cosmos is eternal,' 'The cosmos is not eternal,' 'The cosmos is finite,' 'The cosmos is infinite,' 'The soul and the body are the same,' 'The soul is one thing and the body another..."
The Buddha responds to these inquiries by saying that such questions are not important and that asking such is like being shot by a poison arrow and saying, "I won't have this arrow removed until I know the given name and clan name of the man who wounded me."
Of course, the logical thing to do would be to go to a doctor about the wound rather than wasting precious time asking such questions. So the lesson is, knowing such things doesn't really have a use and it's a waste of time to focus on them, that time could be much better spent developing oneself.
Arguments for Buddhism being a Religion
Buddhism is still considered to be a religion by the majority of the public, so clearly there have to be reasons for this also. So what are the arguments for Buddhism being a religion? Unless one defines religion as having a centralized belief system based on a god or set of gods, which isn't the definition used by everybody, Buddhism does have religious aspects.
As previously mentioned, the Buddha did discuss metaphysical aspects of reality that are typically associated with religion. While the Buddha stressed this wasn't as important as the practice, he still mentioned them, and they are a part of Buddhist teachings. The most "religious" aspects of Buddhism are probably the Buddha's discussions of the afterlife and the various realms of existence.
The Buddha does mention the Thirty-One realms of existence that one can be reborn in after death throughout many of his sermons, and references to supernatural beings and the other realms can even be seen in his first and most famous discourse, the Dhammacakkappavattana Sutta. These aspects of Buddhism are often times overlooked by those who advocate Buddhism as a philosophy, which is understandable since knowing details about the Brahma and Deva worlds isn't particularly useful for most people. Whether you find it useful or not, the Buddha did mention them and such details are still parts of Buddhism.
The Buddha also addresses various questions about society that can sometimes be seen as being similar to religious questions, such as why there are so many differences between people and why the world is so unfair. In fact, this very question was asked in the Cula-kammavibhanga Sutta, in which the Buddha gives a brief summary of the famous Law of Karma to explain the "unfairness" of life.
Another, not so scriptural, argument for Buddhism being a religion is that it's just easier for everyone if it's simply classified as such. It's much easier for keepers of religion statistics to classify Buddhism as a religion than to ask people what their "religion or philosophy is". And whether or not it is technically a religion, it essentially serves a similar purpose to most people in the world as (other) religions like Christianity.
There are those who firmly believe Buddhism is a religion and those who firmly believe it is a philosophy, some are casual about it; some are quite meticulous about it. Believe it or not, I have encountered people who actually put in the effort to carefully look for details and technicalities in how people talk about Buddhism or how things are run at some Buddhist organizations for the sole purpose of preaching about how Buddhism is one or the other.
In the end, each side has their own points, and it is a legitimate debate with solid arguments both ways depending on how one defines religion. However, the lesson of the Cula-Malunkyovada Sutta mentioned earlier is that one should focus more on personal practice above any kind of superficial concept, or definitive knowledge.
There's a story I heard in college that would explain this point in regards to the religion-philosophy debate quite well. An associate of mine told me a story of this staunch nihilist who gave a long speech to a group of people about how nothing in the world means anything, ever will mean anything, and that there is no point to anything, etc. He was very adamant about it, and was quite passionate about his nihilistic views. After he finished his tirade, one of his listeners turned to him and replied: "Who cares?"