Would noble men be able to have sex with women before they were married and during their marriage, without any repercussions? Or were there consequences to a man having sex on a regular basis, with a woman or women that were not his wife? I am thinking that the most obvious choice for a noble man would have been to go to a brothel and/or to have a mistress. Was there any stigma attached to men that engaged in such behavior?
And with regards to women, were they able to engage in regular sex with a man, before they married or after they were widowed? Provided that they did not end up pregnant with a child, outside of marriage?
Also, how aware were the people in the Middle Ages of sexual transmitted diseases and how were they able to prevent getting them or how were they able to treat them, once they got them?
I hope a proper History of Sexuality person shows up on this, because I'm just a Church History Guy who occasionally ventures into sexuality.
So with respect to non-married hetero sex, the short answer is no, there wasn't much in the way of real restriction on noble men who wanted to have sex with someone not their wife either before or during marriage. In fact -- and this continues into early modern times as well -- kings having bastard children was something of a symbol of masculinity. That said, this prerogative was a male one. Women had all sorts of strictures on non-married sex. These strictures were more draconian in the German-speaking parts of the Holy Roman Empire than in France or England (and I'm regrettably not really qualified to talk about Iberia and points south and east), but everywhere strictures on women were pretty severe.
Churchmen (the more devout ones, at any rate) didn't like this, but they'd prefer a heterosexual appetite among elites than suspicions that they were having gay sex. The Franciscan friar John of la Rochelle’s (df. 1245) sermon to university students on the First Sunday of Advent inveighs against, “that hypocrisy concealing the ignominies of the cursed and unspeakable ugliness of the sin against nature under the appearance of sanctity.”
So what about gay sex? I'm talking about gay sex rather than homosexuality as an orientation because while there was something of a rough-and-ready understanding that there was a class of people who, all things being equal, would prefer sex with someone of the same gender -- In Lanval when the knight Lanval refuses to sleep with the queen, she denounces him as a "sodomite" -- there was in general a sense that act rather than orientation was a sin. Churchmen usually railed against this, and it lacked the social "winking at" that unmarried heterosexual sex by powerful men got -- but someone powerful enough (like, say, a king) could flout church prohibitions against gay sex (and indeed, royal "favorites" were a perennial object of jealousy). If a king was otherwise performing masculinity in the bounds of society (e.g., warfare, hunting, tournaments, etc.) and fathering heirs with his queen, then having sex with other men on the side wasn't really much of an issue.
There were far fewer options like this for women, and even the literary and poetic conceit of a man in love with a noblewoman married to someone else was often of the inability to consummate this love. (Although IIRC Occitan poetry has straight-up poetry about extra-marital sex by women.)
Unmarried young women having sex among elites was considered something of a no-no, but the further down on the social ladder one went, the less strictly enforced it was. Widows, by contrast, were understood to have needs and so there was a general social allowance for them to have sex without necessarily being married.
Oh, and with respect to higher status women, a mistress of a great magnate or royal mistress was usually considered socially acceptable.
Someone else will have to answer the question about STIs. IIRC the general consensus is now that there may have been syphilis pre-Columbian exchange but that it got more virulent when coming into contact with New World strains. There was definitely a sense in the 1490s when syphilis outbreaks started occurring that this was something new and unprecedented.
This is a quick and somewhat low-effort reply. A historian of sexuality could do a better job and with more references, but I hope that this at least gives the general contours of an answer.