Religion is a composite made of beliefs, ideals, moral codes, and expected behaviors that is intended to bring together people who share the same group of ideals, beliefs, and behaviors, and moral codes. This entails that its purpose is good, inclusive, and aiming to keep its followers in a healthy mental and spiritual state. However, it is the followers who use religion to serve political, egotistical, or other agendas what gives religion a bad reputation.
Here is why.
As it is expected, every country harbors its own set of races, cultural codes, languages, and ethnicity. It is more than obvious that not all humans could possibly share ONE of the tenets of religion in the same exact way, let alone all of them at once.
When one group wants to impose their views on what they believe are the factors that should make up a religion, conflict is sure to begin. That is the first problem: The issue of one group using it for self-serving purposes, or believing that their beliefs and conduct codes are superior to other groups.
The other reason why religion has been a source of dissension among nations is because religion is often deeply rooted in the history of the group that practices it. History determines many things, from the social break-down of a nation, to politics, to self-identity. All of these are driving factors that motivate people to identify themselves with the factors that make a religion. Once that self-identity is overblown by an unhealthy sense of nationalism (which has been the leading causes of wars such as WWII), or by a sense of Godly entitlement (such as the eternal battle between the Arabs and the Jews), chaos ensues and rivalries go from bad to bitter.
Therefore, while religion is supposed to be the model of behavior that will keep its followers both sound of mind and soul, once other (human) factors are involved the tenets of spirituality become corrupted. It is the people who cause this, not the religion itself. When people add egocentric behavior, self-aggrandizing, self-entitlement, and mix politics with it, religion can be used as a tool of division rather than unity.