Upvote:5
I'm going to assume the question, like most people who bring up questions relating the two these days, is referring to only "pair-bonded" (strict) monogamous relationships.
The thing is, such relationships aren't really universal even today. There are definitional disagreements over the issue, but its been argued that only about a sixth of modern cultures feature that kind of relationship, although most have some kind of overt nod to one. The relationship mentioned in that Sumerian poem certainly wasn't of that ilk (marrying a new person every year obviously begs the question what happened to the wives from the previous years)
History actually isn't going to be of much help for us here, as both Religion and monogamy appear to be at least as old writing. You might think Archeology isn't a lot of help either, as neither preserve very well, but it does have a surprising amount to tell us.
We do have evidence of Neanderthal religious practice, and I believe haven't yet found any good evidence from earlier hominids, so its possible it was an early innovation of Homo Sapiens over previous hominid ancestors. Certainly the later wave of Cro-Magnon people were practicing some form of it right up to the dawn of the historical record, as they have left their idols and stone ceremonial structures strewn all over.
As for monogamy, there is some evidence that humans and other primates that practice it have hormonal differences that show up as skeletal differences. I'm not sure how well-accepted that is, but some anthropologists used that to study old hominid finds, with the result that it appeared that human pair-bonding is quite recent indeed. Our (quasi?) religious Neanderthal predecessors didn't do it, nor our more direct ancestors, the early Cro-Magno people.
Pair-bonding, in a broad sense, is universal among humans, but it is not known when the transition from a promiscuous mating system to a stable bonded one occurred. The persistence of marked levels of skeletal dimorphism in Homo until the Middle Pleistocene (e.g. [14]), combined with genetic evidence indicating that male population size (ancestral to people today) was low compared with females' until the spread of agriculture [46], implies that human-like pair-bonding was not common until late in human evolution.
Now a historian will tell you that effectively agriculture = writing = civilization.
So we don't (and perhaps can't) know, but it looks likely that pair-bonded monogomy and religion followed very different human development paths starting from very different places, and the only modern relation between them is coincidental.