Metal Gear Solid 2: Sons of Liberty
Sunny is the daughter of Olga Gurlukovich, who was kidnapped at birth by the Patriots. The Patriots sent Olga pictures of Sunny every month and eventually used her as ransom to force Olga to assist Raiden: if Raiden had died, no matter the cause, Sunny would have died along with him due to neural implants. Olga eventually sacrificed herself in order to keep Raiden alive, thus keeping Sunny alive.
Unknown Time Period
At some unspecified point between Sons of Liberty and Guns of the Patriots, Raiden honoured Olga's sacrifice for him by breaking into the Patriot-controlled facility where Sunny was being held and rescuing her from their control. It is implied, though never stated outright, that it was this mission where Raiden suffered the grievous physical injuries that resulted in him being rebuilt as the third Cyborg Ninja.
Metal Gear Solid 4: Guns of the Patriots
After Raiden rescues Sunny from the Patriots, Solid Snake and Otacon take Sunny onto the Nomad. Otacon is a computer genius and serves as a father figure to Sunny, who helps him build the Metal Gear Mk. II and III. She also finishes the worm that shuts down the Patriot System after the Mk. III installs it. Sunny was kept alone as a worker by the Patriots and never had any friends so she has had no social experiences with other people. This is presumably the cause of a bad stutter that she has when talking to others.
Now seven-year-old Sunny serves perhaps most notably as the Nomad's cook, and she particularly likes to make eggs "sunny" side up. She also uses this as a form of fortune telling: if her eggs turn out well, the mission they are currently on will be a success, but if they don't, the mission will fail. However, Sunny isn't a very good cook and often burns the eggs. After meeting Dr. Naomi Hunter, her stutter starts to fade away as Naomi teaches her how to properly make eggs. After Sunny's upgraded version of Emma Emmerich's worm program, FoxALIVE, destroys the Patriots she meets her first friend outside of the people on the Nomad, and she gives him the Mk. III as a gift.
Metal Gear Rising: Revengeance
After shutting down the SOP system, Sunny is adopted by Otacon and enrolls in school. However, because of her past with the Patriots, she is too intelligent for her peers of the same age and only stays in school for a year. With some help from Otacon, she begins to work at a company called Solis, a space-research and engineering firm based just outside of Denver, Colorado.
When Raiden needs to reach Pakistan in a short amount of time, he reunites with Sunny and asks for her help. She single-handedly developed a Mach 23 aircraft and lends it to him and Bladewolf in order to prevent the assassination of the president. When she realizes what kind of danger she put Raiden in by borrowing her plane, she regrets helping and starts to doubt her career in science.
Afterwards, she reflects on Raiden's past, saying that he is really a hero in spite of what everyone else thinks of his background.