Is there a social difference between a man having a bastard born before a marriage? And what would happen e.g. if the man brought the (male) bastard up in his home and then later married? How big would the insult to his wife be if he didn't send him away once he's married and has trueborn children?
There’s no real social difference to bastards born before a marriage or during one. They’re both illegitimate, without the grace of wedding vows, born “on the wrong side of the blanket”, from “lust and lies”, etc, all that stigma. A lord’s wife might feel somewhat different about them on a personal level, but general society won’t; though for either type, she would greatly prefer that her husband have nothing to do with them, other than seeing to their general well-being as is right and proper.
In the case of bastards born some time before a marriage, we have at least four examples.
Daemon Sand, the Bastard of Godsgrace, whose father Ryon Allyrion only married Ynys Yronwood recently (they have two toddler-age sons). There the more lenient Dornish attitude towards bastards most likely applies; Daemon was a companion of Princess Arianne Martell in his youth, squired for Oberyn Martell, and accompanied his father to King’s Landing as part of the Martell party, for examples. However, if Ynys is not particularly accepting of Daemon and feels insulted by his presence (especially since the Yronwoods are stony Dornishmen and least influenced by the Rhoynar), we will likely find out in TWOW, as Daemon is part of Arianne’s diplomatic party to meet the pretender Aegon Targaryen.
Rolland Storm, the Bastard of Nightsong, who is presumably at least a little older than his trueborn half-brother Bryce Caron. House Caron has the unusual situation in that most of them were wiped out by illness in Bryce’s childhood – Lord Bryen, his wife, his younger son, and all his daughters – leaving only Bryce and Rolland. If Rolland had been raised elsewhere before Bryen and his wife died – and it is possible he was, as he’s called “a seasoned killer”, therefore, considering Robert’s relatively peaceful reign, it may be he took a turn as an Essosi mercenary or a traveling knight dealing with local lords’ little battles – it doesn’t seem to have affected his and Bryce’s relationship, as they declared for Renly together (Bryce even becoming a Rainbow Guard) and then for Stannis. After Bryce died at the Battle of the Blackwater, Rolland became the pretender lord of Nightsong (the Lannisters granted it to Philip Foote, Bryce’s killer) and castellan of Dragonstone. We’ll just have to see in TWOW what happened to Rolland Storm when Dragonstone was captured by Loras Tyrell, and if we find out more about his history.
Aurane Waters, the Bastard of Driftmark, scion of House Velaryon. Actually, it’s not certain whether Aurane was older or younger than his half-brother Monford Velaryon, who had a 6-year-old son, Monterys, before he died at the Blackwater. But Aurane was evidently raised at least on the island of Driftmark, if not perhaps in Driftmark castle itself, and he sided with the Velaryons when they declared for Stannis. But though young Lord Monterys has remained loyal to Stannis, Aurane surrendered to the Lannisters, becoming a courtier and eventually Master of Ships (Lord Admiral)… until he used his position to have a fleet of great warships built, manned them with criminals, and stole them to set himself up as a pirate king in the Stepstones. Aurane Waters is another where TWOW might give him more background history for us to see.
Mya Stone, eldest bastard daughter of Robert Baratheon. At least we know her history in detail. :) Mya was born in the Vale when Robert was about 17, still a ward of Jon Arryn. She was taken in by House Royce of the Gates of the Moon (it’s possible her mother was a servant at the Gates, the Arryn winter castle, or living in a village nearby, as it was probably winter when Mya was born), and still works for them as a mule leader. When Robert, disgruntled with Joffrey after the disturbing incident with the cat, mentioned to Cersei that he was thinking about bringing Mya to court, Cersei not-exactly-subtly threatened Mya’s life, so that didn’t happen. Cersei is a little more overt than most lord’s wives would behave – but she did clearly see how much of an insult to Robert’s (nominally) legitimate children bringing Mya to King’s Landing would be, and Robert’s motivations for doing so. (Note: Gendry does not count for purposes of this discussion, even though he was probably born (at the very least, conceived) before Robert’s marriage, because Robert never knew he existed.)
So you can see, as with most things, it depends – but truly, no matter when a bastard is born, their presence is generally an insult to a lord’s legitimate family. That is, unless they’re made servants (Falia Flowers, the Frey bastards) or deniable assets (Tyler Hill, the Frey bastards again) or the legitimate family is dead or lonely (Bryce and Rolland, Domeric Bolton and Ramsay), or other rare exceptions (Jon Snow and other Stark bastards). I hope that helps!