In Project Horizons, a Fallout: Equestria fanfic (a fanfic of a fanfic), most of the villains have these. This is lampshades several times, but the funniest is when Blackjack rejoices upon finding a villain who *doesn't* have one, because she wouldn't feel sorry about the ensuing fight.
In A Charmed Life things are not as perfect in Light Yagami's life as he pretends them to be—he is a very unhappy person and he thinks of Ryuk as his first real friend. Of course he's still a mass murderer...
"The Beyond Birthday case made so much more sense now, BB wasn't a megalomaniac he was L's spurned and neglected lover. Clearly the jam was just the aftershock of being forced into sex with someone that looked vaguely like a crack head. And she had prevented him from burning himself alive, if she had to have sex with L she might have tried to burn herself alive too. Naomi noted to herself that perhaps it was a good time to go to L.A.'s prison and apologize to that poor madman."
Teru's canon backstory of being an emotionally disturbed and constantly victimized Bully Hunter is kept intact. Umbra notes that he may see Kiyomi as a replacement mother-figure since his actual mother "deserted" him.
Misa, equally disturbed, also keeps her canon backstory (witnessing the brutal murder of her parents) WITH the addition of her older sister Kimiko, an alcoholic who has always had a strained relationship with her and their late parents. She is also still mourning the loss of Light and grappling with the reverberations of their "relationship."
Mello’s Face–Heel Turn is spurned by his grief and rage upon discovering that L had killed himself and yet still never chose between him or Near as his successor. His feelings of betrayal and abandonment are the common ground on which he bonds with Misa, former minion from the opposite side.
Before coming to Wammy’s House, Matt was raised by an alcoholic father who could be emotionally and sometimes physically abusive, and their dysfunctional relationship closely mirrors the one Matt currently has with Mello. The former is so codependent on the latter he still goes with whatever he wants even if he knows in his heart that it’s wrong.
Before becoming the next Kira, Kiyomi suffered emotional and financial abuse at the hands of her mother, and appears to have issues with men due to her Extreme Doormat of a father and the sexual harassment she had to put up with from Demegawa.
L is presented with as much of a Dark and Troubled Past as one might suspect of him. As an infant, his parents were murdered by their insane housekeeper who kidnapped him out of want for a baby of her own. After her arrest, he spent some time in foster care before meeting Watari, who gave him the opportunity to become a Great Detective and by his suggestion had his death faked during the Winchester Mad Bombings. In addition to his Friendless Background, he struggled with the suicides of his kidnapper and A (his first successor), as well as the Face–Heel Turn of B (his second successor) and what is implied to be shame just for how he was as a person. Considering his meeting Erin as the closest he'd get to doing something genuinely good, he still follows her around even after his death and rebirth as Umbra.
If Lumen’s attitude towards Soichiro is any indication, Light (his previous incarnation) carried a lot of anger and hostility towards his father upon his death. Soichiro, still grieving for Light and blaming himself for all the misfortune that’s happened between them, is unsure what exactly he hates him for…between his often being away on duty while Light was growing up, pretending to execute him at L’s request, and taking L’s side when Light exposed himself as Kira to the whole task force.
Roger has one that could explain his issues with children: his parents, especially his father, weren't exactly kind people, and when he was in school he got a girl he was seeing at the time pregnant. He did the responsible thing and married her but kept wishing that they weren't having a baby and thinking about how he didn't feel ready to be a father. His wife ended up dying just after giving birth to their son, who turned out to be stillborn. He felt horribly guilty about the whole thing for a long time afterwards; in fact it's implied that he never completely got over it.
Watari and his mother were forced to leave his scientist father behind in Europe in the wake of WWII when he was little, and after his mother died some years later he was raised by their neighbor and maid who herself happened to be a Broken Bird, encouraging his talents at inventing and marksmanship. She's probably where he got the idea to train orphans.
Near’s mother had him while she was young and dumped him on his sick grandmother. Presumably thereafter, most people he came across considered him a freak. With Roger as his only real confidante, it’s revealed that he acts the way he does so he won’t be hurt by anyone again. Not to mention his own feelings of resentment towards L, and the guilt he feels for not being there for Mello as much as he doesn't know how to express support for anyone.
In The New Retcons Elly's hatred of motorcycles stemmed from being rejected by her first boyfriend and the father of her first child, who was an avid motorcycle rider. Her obsession with cleanliness was caused by her grandmother calling her unclean after she had a child out of wedlock, a feeling made worse when her first marriage dissolved. That same incident caused her brother Phil to swear that he'd never have kids.
In Heir Draco Malfoy is regularly tortured by his father via the Cruciatus curse. Also there's Harry himself- in this fic his abusive childhood is played much more seriously and as a direct result he's now a dark lord in training. Then there's Voldemort— as a child Tom Riddle had a psychotic break when the other kids at the orphanage killed his baby snake in front of him.
The Jaded Eyes Series is another fic where Harry's childhood is played much more seriously as it becomes his Start of Darkness when he snaps and murders the Dursleys. Then he ends up in an Orphanage of Fear where he's regularly bullied by the other kids and has the scars to prove it. It gets worse when Harry discovers that his parents are still alive and have a perfect little family and a little brother who was living a perfect life while he was living in that Hell.
In Diagnosis Harry expressed his annoyance at this particular trope when telling Hermione about his lessons with Dumbledore sixth year.
...He made a point to mention to her that it was hinted that Riddle had been abused, and that his mum had bewitched his father who was a Muggle, and even that he was more than likely unloved and abused, but that it was no excuse for what he became. The abused aren't predestined to become the abusers, and it always hacked Harry off when people, including the Headmaster made it seem like it was some sort of excuse.
In Kill la Kill AU, the reason as to why 8-year old Ryuuko is a delinquent seems to stem from maternal deprivation from being separated from her mother at two-years old and her anger and upset thereof of something she felt sad about, yet didn't know what it is, as well as the fact that no one would tell her.
Mega Man: Defender of the Human Race subverts this. While Dr. Wily does have an abusive father who colored his outlook on life, the story takes pains to show that Wily himself is a horrible man who deserves punishment.
Stray discusses this - it's set in the Metal Gear universe, land of villains with unhappy childhoods, and at least two characters (including one of the protagonists) are former Tykebombs. However, Adamska (one of the tykebombs in question) eventually rejects the idea that a person's essential nature can be changed by the actions of other people.
Meimu Uchiha from Reincarnation Roulette by Silver Queen has some great reasons for being the cold hearted villain she is. Namely, she's a self-insert born into the Uchiha clan, and realized she'd have a miserable life if she became a ninja. Unfortunately, her new parents won't take no for an answer, and proceed to literally beat ninja training into her. Her Jounin sensei ends up being Orochimaru, forcing her to be on the lookout for having a Sharingan, lest she end up as one of his host bodies. She succeeds in hiding it by killing anyone who ever found out, but is forced to make herself useful to him in other ways. She gains a younger brother in the form of Obito, and wonders if she'll have it in her to murder him and avert the future. She does, complete with Itachi's "foolish little brother" line. What makes her most disturbingly chilling is the fact that, as Silver Queen's self-insert, she used to be the same person as the protagonist of her most famous fic. The contrast between MeimuUchiha and ShikakoNara effectively makes the former the latter's Mirror UniverseEvil Counterpart.
A Crown of Stars: Gendo abandoned his son because he was just as afraid of Shinji as Shinji was of him. He did not know how dealing with other people or relating to them, and his wife’s loss broke him completely. After hearing about it Shinji did not think it was good enough of an excuse… until he realized he was just like his father.
Advice and Trust: Chapter 8 examines how Gendo does everything he does because he is a broken man, utterly afraid of other people, that was completely obsessed with getting his deceased wife back.
Once More with Feeling: Chihiro Tanaka's aggressiveness, vindictiveness and rude behaviour is later explained as the result of growing up without a mother.
The One I Love Is: Most of the story is narrated from Shinji's point of view, so Gendo is treated very unsympathetically most of time. The "Let the World Burn/One Dream at a Time" side-story explores his personality and motivations. Gendo is depicted as a pathetic, broken shell of a man always felt lonely and frightened of other people, thought nobody would ever love him because he was not worth it and fell utterly apart after his wife's death, sending his only son away because he was scared of Shinji and of hurting him.
Beyond The Winding Road: Edith beats the crap out of kids in her class, blatantly disrespects teachers and other authority figures, and throws other people's emotional baggage into arguments when she's losing control of them. But she's also suffering from some extreme Parental Neglect and it's heavily implied she was both ostracized from the community due to her mother's previous scandalous actions and sexually harassed by the boys in her school (in her introductory chapter, some boys fill her locker with condoms, though the author never outright states what they are). Worse, those same teachers and authority figures were predisposed to find fault in her whenever she came to them due to her mother's reputation.
In Gensokyo 20XX, we have a rather non-villainous example in Yukari, in that it be a fairly safe assumption some of her issues she's had, especially wanting to have a child to such an extent that it tears her up inside and some issues with attachment (either would be described as "something to love, something to hold, occasionally scold, and something that would take away an intense pain"), seem to stem from being abandoned by her parents, to whom she referred to as "two large shitbags", when she was two.
In Yu-Gi-Oh! Forever, several villainous characters have a Freudian Excuse for why they turned to the dark side. 1) Jan Shimizu, the Black Sheep of his family, recounts late in the story that his father, Ryou Bakura, frequently treated him with subtle contempt because Jan's appearance reminded Ryou too much of the abusive spirit of the Millennium Ring. It led Jan to leave home and change his last name, to distance himself from the family, and led Ryou to declare I Have No Son concerning him. 2) Michael Bronte, a member of the JUDAS organization's Quirky Miniboss Squad, explains that the reason he joined the group was initially to exact revenge on his parents—specifically, his stepfather used to physically abuse him as a child, while his mother turned a blind eye. Present-day Michael is an Ax-CrazySlasher Smiler who enjoys perpetuating Cold-Blooded Torture on his victims. 3) Angel Snow, a member of the Zodiac terrorist group, grew up with a drunken and physically abusive adopted father. The Dragon then liberated her from that home situation, and she jumped at the chance to give him her loyalty. 4) James Truesdale, another Zodiac member, has a particularly painful one that he hides behind a mask of stoicism and thinly-disguised contempt for his sisterand father: his mother died giving birth to his sister, and his father made him keep his grief hidden for the sake of the little girl. He blows up spectacularlywhen he finally reveals his past and his repressed anger.