From a historical perspective, religion has been in existence as long as civilization. For many centuries, it was central to the function of society, in day to day, as well as political life. Religion invokes a feeling of respect of something greater than yourself, which is central in guiding your life.
Religion is a source of hope for people. That is a fact, which plays a role in many historical events. The Romans would pay homage to Jupiter, to ensure his blessing before going on campaign. In Rome itself, days on which events were to take place, such as the departure of the army, or elections for magistrates, the priests were consulted, and it was they, who recommended the proper days for holding events, in order to be in harmony with the gods.
Hope is the feeling of an individual, or a society, that the future holds better times for them. It serves for internal peace and semblance. Basing one's life on that hope has been central throughout history, and the fear that the higher authority is key to determining how a person's life turns out, it is also cause for concern in doing anything against the principles dictated by the set of beliefs that a person is following.
Sinning is defined as doing actions that oppose the message of goodwill a religion is trying to profess. Even people who don't feel they have an affiliation with any particular deity, believe in a set of morals that are found in holy books.
The progression of belief systems, however, has also had an impact on how people behave. In the ancient world, polytheistic religions dominated: those of the Greeks, Egyptians, Persians, Gauls and Romans. Each religion was alive for as long as the people following it were. In the decades leading from the beginning of the new era, since Christ's birth, the increasing influence of monotheistic religions has taken hold. This was met with resistance.
When people of one religion face an unknown set of beliefs that another group professes, they react with fear and uncertainly. In the case of Rome, Christianity spread with the rapidity of wildfire throughout the empire. As a result, the emperors saw this as a threat to the stability of the state, and established a policy of pogroms, or armed suppression and persecution against Christians.
This confrontation between religions leads to a divide in subsequent generations. The struggle between the polytheistic Romans and the monotheistic Christians lasted for several centuries, until Constantine instituted Christianity as the official religion of the eastern Roman Empire, soon to become the Byzantine Empire. With the general dominance of the new religion, people began to accept it as a norm, and that's also one show of behaviour, in which people adapt themselves to the new settings, once the change has been around for a long enough time.
One particularly hostile confrontation is between Christianity and Islam. After much of south-eastern Europe was taken over by the Ottoman Turks at the end of the fourteenth century, they instituted mass killings and conversions to Islam on much of the local population. The result was that a very hateful sentiment was established within the subjected population, and armed revolts sprang up sporadically for the next five centuries. At the end of the nineteenth century, many states regained their independence, but that conflict, on a religious basis, remains to this day. There is a mutual dislike between modern Balkan states and Turkey, because history provides a fertile ground for tradition and more rigid mindset.
On a personal level, as Matthew Garner has pointed out in his article, "this religious rigidity can spill over into the life of the follower's family. A parent who has grown up in a strict and inflexible religious environment will likely impose these same sanctions upon his or her children". National identity plays a very important role here, because history is the ground, onto which such viewpoints are based. In the family unit, children may grow up with their parents' prejudices, and eventually, find like-minded people, who share their views.
This leads nicely into the next point about behaviour and religion. Throughout history, religion has proved a very effective tool for unifying people. Evidence can be seen in many places, including the years of the reformation of the Catholic church, and the various groups that dispatched from it. One could argue that it is an example of disunity, but instead, with the advent of the printing press and the spread of knowledge, people began to question and interpret the Bible for themselves; the result was finding people that shared the same point of view, and uniting with them: with the immense political and societal effects the Reformation produced in Europe, one conclusion can be reached: religion was a unifying factor to the warring parties.
In conclusion, religion is a complicated subject. People use it for solace and hope for the future on a personal level. History of their society, however, can shape individual beliefs, either negative or positive, about foreign religions. Confrontation can lead to suppression and killings of a rival belief system, and thus produce hate and prejudices. As a unifying factor, religion is an extremely good means, because it helps people rally around a cause and work together towards it. Even as a political tool, religion helps society become used to change, as is the case with Constantine and the Byzantine Empire. All in all, religion is a multidimensional entity, with complex effects on the behaviour of individual and society alike.