In Code Geass, Lelouch acquires this at age eight, when his mother is murdered in what may be a court intrigue, about which his father the Emperor does nothing. When Lelouch calls him out on this, his response is to send the kid over to an enemy country as a hostage and bargaining chip. Not long after, he invades the country that is hosting his own child, in a very bloody war. No wonder the kid ends up the way he does.
Flashbacks reveal that Homura from Puella Magi Madoka Magica started the series as cheerful, klutzy, and a Wide-Eyed Idealist. Repeated failures to save Madoka in timeline after timeline caused her to slowly withdraw her faith in the world, turning into The Stoic character she is today.
In Naruto, Sasuke Uchiha ends up taking several of these, falling all the way down to omnicidal insanity and looping back into being an Anti-Hero and wishing to become the ruler/protector of the village, deciding that he will do better than his callous, brutal predecessors.
All three of the main cast in Cowboy Bebop had such an event horizon long before the plot starts; they were all betrayed by a close friend or a romantic partner, and as a result have closed themselves up to the world. It takes them a long time to learn to care about each other, but, in the end, that's not enough to save them.
Ciel Phantomhive from Black Butler was a Cheerful Child when younger, but after his parents died and became enslaved for a year, he became grim and brooding just like in the present day. He's basically Bruce Wayne if Alfred were a demon and the Waynes were a Black Ops. dynasty.
In Runaways This happens to just about everyone (except Gert who was a horrible cynic from day one).
Nico goes from being naive and trusting of just about everyone to very closed off, cautious, and suspicious. She also becomes progressively more snarky as the series goes on.
While Chase always had some issues to begin with, he still managed to come across as an irrelevant Jerk Jock and when paired with his cynical girlfriend, came out looking like the positive one. His world view becomes less bright when grieving Gert and in Avengers Undercovergoes back on his promise not talk about the events of Avengers Arena because everyone knows what happened anyways and from where he was standing that meant Arcade already won
While present! Molly is mostly her hyperactive, happy to face the universe self, future! Molly from Battle Of The Atom hits the Despair Event Horizon after President Dazzler is killed and becomes evil, abandoned her childhood believe she could be a hero and save everyone despite who her parents were.
Karolina is mostly unchanged, but more willing to acknowledge anyone is cable of evil or having bad things happen to them and is, like her teammates, much less naive and trusting than at the beginning of the series.
Batman made it his life-long mission to personally fight crime because of his parents' murder, which he witnessed as a child. Depending on continuity, this causes Child!Wayne to "grow up in a big hurry" into different degrees of cynicism:
Though overworked and underpaid as a waitress, Sarah Connor still harbored hopes for a brighter future in Terminator. Then Kyle Reese spelled out a horrid, brink-of-doom future with the Terminator as proof. Sarah develops enough cynicism to stockpile weapons and munitions galore in caches dotting the Western seaboard for her son John to use against Cyberdyne's machines.
Arya and Sansa Stark from A Song of Ice and Fire starts the series as naive and idealistic, but their father's beheading only kickstarts chains of events that will result in disappointment after disappointment for both of them. By the fourth book they've both acquired Jade-Colored Glasses. The result? Having both given up on their initial idealism, Sansa is now learning to manipulate people in order to come out on top, while Arya is graduating to Professional Killer levels.
Sherlock and his brother Mycroft appear to have had such a moment very early in their childhoods, where they interiorized that "caring is not an advantage", to the point that they both think of themselves as sociopaths (which they aren't). It takes Sherlock a lot of time, and being given a lot of love, to learn to allow himself to care about others again.
Subverted in The Sarah Jane Adventures. When we first catch back up with Sarah Jane on Doctor Who she's still a bit bitter about the Doctor leaving her behind and is no longer the wide eyed, impressionable young women she was in the classic series. This manifest in the first episode of SJA as her being really cold to her new neighbors and coming across a straight up Distaff Counterpart to the Doctor. At the end of the episode she softens, noticeably regaining her humanity by adopting Luke and accepting her neighbor Maria's help. She stays Older and Wiser, but becomes a bit more open with people and shares a very idealistic view of the wonders of the universe and the creatures that inhabit it.
In Doctor Who, the nicer and more benevolent The Nth Doctor is, the more the universe tends to test him with Break the CutieTrauma Conga Lines: the Fifth and Eighth doctors are especially egregious examples. The Time War, however, may have been the most traumatic event for him, but it's not clear whether the trope is played straight or subverted: he becomes more jaded, but also feels a stronger obligation to help others and do the right thing. There's also the matter of the Timey-Wimey Ball involving some changes in how things were experienced. And, well, he's the Doctor; an enigmatic Mood-Swinger, it's often frankly hard to tell how he feels about stuff.
In both the Comics and Television adaptation, the main group of survivors in The Walking Dead gradually become more and more dehumanized as the apocalyptic crisis becomes the new norm and find that the greatest threat to their survival are other Humans rather than the undead.
Person of Interest: John Reese wasn't exactly an optimist in the first place, but he still believed in the work he was doing and found life-affirming purpose in saving others... Until a dear friend of his was killed, and he went from that to thinking all his efforts were just delaying the inevitable.
This is kind of a game mechanic in Dragon Age: Origins: at different points of the plot, you can choose to "harden" your two token idealistic companions, Alistair and Leliana, via dialogue, which makes them much more tolerant towards more amoral actions you can take later on (and incidentally, makes Alistair a better king). In both cases, the catalyst is a betrayal, by family and by a mentor, respectively. Of course, you can just as well reaffirm their inherent idealism instead.
Looking for Group: Cale is very idealistic, innocent, and naive at the beginning of the comic, but he starts to become more cynical after he's forced to kill a child in the past to maintain a Stable Time Loop. Similar events that come afterward only serve to make him become more and more on the cynical side on the Sliding Scale of Idealism Versus Cynicism as the comic continues.
The Boondocks' protagonist Huey Freeman starts off very cynical, but also proactive and hopeful in improving things for the better. By the third season, though, it's clear that he's given up hope, and he's resigned himself to let the rest live on in blissful ignorance.
Avatar The Last Air Bender: Katara spends the first two seasons giving inspirational speeches about hope and love. After Prince Zuko royals betrays them by claiming to be a better person only to let Azula hit Aang with what should have been a fatal shot of lightning, betray his uncle, and rejoin Fire Nation nobility, she is the last to trust him when he claims to have made a Heel-Face Turn for real this time and almost kills the man that killed her mother in cold blood.
The Simpsons: When Reverend Lovejoy first showed up in Springfield he was a go-getting down to earth pastor who wanted to "rap" with his parishoners. Then Ned Flanders started bugging him all the time, wearing him down until he just stopped caring about anybody. "Luckily, by then it was The Eighties, so no one noticed."
Real Life: This trope might as well be called "Loss Of Innocence"; there's a concerted effort to create a protected environment around children where the adults at least appear to be trustworthy. Then puberty and adulthood hit, and things are not so simple any longer. It can be quite a struggle, to keep one's spark bright through all that.