Although we think of the three words in the title of this posting as having some general relationship, it was much less so in certain other cultures.
In ancient pagan societies (Babylon, Egypt, Sumer, Akkad, etc.), marriage had very little to do with love. It was a very businesslike arrangement. Women were either sold into the marriage, or it was arranged for them by their fathers or other male relatives. For the female, the main benefits - if any - of marriage were that she had a man who was legally obligated to provide some of the necessities of life for her and the children, and that the marriage legitimized her status as a mother, and the husband provided some protection from both physical danger and social disgrace.
For the male, marriage ensured a well-managed household, and a woman who was essentially obligated to be his companion.
How different from our modern conception of marriage! We consider marriage to be a voluntary agreement to share a lifetime together: an agreement in which both parties respect and care about each other, a union in which a man and a woman want to provide good things to each other. When did this change happen?
It started long ago. The Hebrews seem to have been the first to clearly state and emphasize the concept of marital love. One of the the world's oldest love poems, stressing the union of two lives, is the product of the ancient Hebrew culture. It goes by various names: The Song of Solomon, the Song of Songs, the Canticle of Canticles. While the Babylonian husbands were apparently busy ignoring or beating their wives, the Hebrew men were bringing flowers to theirs.
But how did this idea of marriage as love spread to other cultures? As with many Hebrew ideas, the Christian faith spread this concept around the globe. So much of what is often considered to be Christian is actually Hebrew.
Before Christianity was introduced into Europe, the polytheistic natives there treated their women no better than their counterparts in the Ancient Near East, buying, selling, and beating them. Now, modern European culture is thoroughly influenced by the Hebrew notion that marriage is about serving one's spouse, not about controlling one's spouse; and, contrary to all stereotypes, the Christian faith celebrates sex as a beautiful and noble expression of love between husband and wife.
Was there ever a time or place in which people taught that sex was sinful? Christianity has never taught that sex between a properly married couple was sinful, if they were showing care, respect, and affection for one another. There have been some misguided individuals who thought that sex was sinful, but the Christian faith has always pointed to such an idea as an error. Sex outside of marriage (either premarital or extra-marital), on the other hand, has always been considered inappropriate, because of the often disastrous consequences for those involved.