I don't know whether religion has been a net positive or a net negative (and I find it ironic that Frank purports to know this) but it's like patriotism for me. It's been an effective tool at controlling the masses. The tool has had positive and negative applications, but I can't easily make the case that they are more negative than positive in society.
This is always an important question for those who condemn organized religion. It is one of those cases, not dissimilar to the implicit argument between the thesist and the atheist, in which the two sides are not necessarily polar opposites. The theist says there is a god, and the atheist says that he doesn't believe it. The opponent of organized religion (who may or may not be an atheist) says the net effect of religion is bad, and the theist says that he doesn't believe it. But the atheist (who is not a proselytizer of the "religion" of atheism) only denies the existence of god when confronted with the proposition--not necessarily bringing the subject up himself (with the above noted caveat). The theist only denies that there is a net negative effect of organized religion when confronted with such a contention--not necessarily routinely preaching a net positive effect on society from organized religion (although i suppose that one could argue that this is an implicit assumption in adherence to organized religion).
When the Salian emperors made war in Italy on the supporters of various Popes, and deposed or elected Popes as of right, and when Henry II of England instigated the murder of an archbishop, you have an example of powerful men who were not deterred by a threat of punishment in an afterlife or motivated by the promise of a reward in an afterlife. It could be argued that the damage which can be done by powerful men (and Henry and the Salian emperors were not the worst of those who defied religious authority in European history) who are not motivated fear of eternal punishment or hope of eternal reward is far greater than would result from a lack of control of "the masses" by organized religion. Certainly a good many people died in Italy in the 11th century while Henry III and Henry IV campaigned, desposing Popes or aspirants to the Papacy and imposing their own candidates, and the equation would be to attempt to assess who much lawlessness would have resulted had there never been an organized church, and whether that would have done more harm that German kings and emperors fighting Italian nobility over the cause of who should impose and dispose in Tuscany and Rome.
Another argument could be made about the difference between organized religion and unorganized religion. Before anyone laughs, what churches commonly refer to as paganism is often found in the form of unorganized religion. Druids were never the controllers of Celtic societies which Roman propaganda has portrayed them as being--the Romans correctly identified the Druids as a potential source of opposition to Roman rule, and painted them in the blackest terms possible. Roman allegations of common ritual sacrifice were based on a few incidents in which Roman prisoners were burned alive, but that is shaky evidence, as they were most likely executed for being Roman, rather than being the victims of a casual and common practice of ritual human sacrifice.
There are many other examples of pagan societies which lacked anything so formal as the social order of Druids among the Celts (Druids never had more than power than influence with chiefs and kings--they had no organized church in the sense of Christianity). The pagan Saxons and the pagan Norse were not the polar opposites of Christians. Saxons and Norse who were pagan believed in the old gods, and embraced a good many superstitions, but were subject to no priesthood, and often deeply resented the imposition of a priesthood. In such cases, great harm could arise with the failure to successfully impose organized religion. Olaf Tryggvasson parlayed a successful viking career into a claim of a Norwegian throne. He was canny enough to see the value of Christianity as an organizing force which he could exploit, and he went about imposing conversions with all the lusty violence which had marked his former career. Under threat of the descent of Olaf on their island, the Icelanders accepted Christianity--but when news reached them of his death in 1000, a great many Icelanders threw off their conversions as though it had been a garment they had donned in cold weather, and there was a great strife and slaughter as many men turned triumphantly against the priests and their supporters. Leif Eriksson had brought Christianity to Greenland at the behest of Olaf, but had been defied by his father, Erik Raudi (Erik the Red), and when news of Olaf's death reached Greenland, Leif's modest efforts dried up completely. No violence was known to accompany those events in Greenland.
So, the study of history does not offer useful natural experiments. Unlike sciences such as physics and chemistry, which deal in replicable experiments, the study of history can only refer to "natural experiments," in which a thesis or principle is compared to known events, and ideally, lessons are learned. The spread of organized religion outside the Roman empire, and after the collapse of Roman authority in the west is too far back in time to afford sufficient information to conduct a "natural experiment." Whether there were more or less violence and lawlessness among pagan Saxons and Norse before the imposition of Christianity than afterward cannot be shown with any reliability. Personally, i suspect that there weren't much difference. However, to the extent that organized religion usually accompanies the rise of higher levels of organized societies, and to the extent that more organized societies so frequently lay their neighbors under tribute or conquer them outright, with organized religion the handmaiden of justification, it seems to me unreasonable to claim that organized religion typically ameliorates the conditions under with "the masses" live.
Robert's account of the story told to people in Brazil to get them to use condoms, as an example of how ignorance can be manipulated with "the masses" did make me think about the message which either religion or "anti-religion" employs, and its likely effectiveness. Those who oppose organized religion frequently shoot themselves in the foot with messages which are offensive to people, suggesting to them that they are ignorant and credulous to believe as they do. By contrast, the community of believers will suggest to individuals that adherence represents the balance of wisdom. Whether in opposition to or in support of organized religion, the most effective message are likely to be the simplest.
Fear of hellfire was a sufficient motivation for the Church in Europe to engage in the selling of indulgences--a sort of "get out of Hell" card. For literally centuries, people in the Church, quite often scholars and occasionally people of high ecclesiastic rank, had called for reform of the Church. The most notable prior to the Protestant Reformation was Jan Hus, who was executed for his troubles in 1415, at the Council of Constance, which had been convened for the very purpose of reforming the Church. Although Hus' patriotic fellow Bohemians defied Papal and Imperial power in the name of the beliefs of their martyred hero, Hus' death was insufficient to spark a widespread reformation.
But more than a century later, Martin Luther's defiance of ecclesiastic authority did succeed. What was the difference between Luther and Hus, or between Luther and any of the others who had previously demanded reform? I would say the simplicity of the inferential appeal of Luther's protest. Luther was protesting simony--which means, among other enormities, the selling of indulgences, of remission in the after life of punishments for sins in this life. The most ignorant, illiterate peasant in Germany was familiar with the selling of indulgences, and the rudest intellects among the peasants could understand Luther's objection, and were thus willing to support him. Jan Hus might only be appreciated by the Bohemians (Czechs), his fellow countrymen, but his arguments against ecclesiastic practice and authority for which he was condemned were not likely to recommend themselves even to literate commoners in Europe, never mind unlettered peasants.
But peasants in France or in Poland could understand the objection to simony as well as could the peasants of Germany. In many cases, the support which Luther got from influential people came because they saw an opportunity to increase their own power at the expense of the church--but it also came from rulers who were wise enough not to buck public opinion, and who were willing to take a risk because of the popularity of Luther's message with the commons, or at least the popularity of the perceived message. Luther succeeded when so many who preceded him failed because the simplicity of the message was accessible to so many people.