(covers information from several alternate timelines)
Birth and life on the Enterprise
Molly was born aboard the USS Enterprise-D in 2368 (around stardate 45156.1). Because the Enterprise was struck by quantum filaments that rendered various parts of the ship inaccessible to the rest of the crew, Keiko was trapped in the ship's Ten Forward lounge when she went into labor, and Molly was delivered by Worf. The O'Briens seemed to have been preparing for the birth of a boy, which made the female child surprising. (TNG: "Disaster")
Later that year, Molly, together with her mother Keiko, was one of the crewmembers taken hostage by Ux-Mal criminals that had taken over the bodies of Data, Deanna Troi and her father, Miles O'Brien. Molly didn't stop crying and so caused some tension amongst the kidnappers. When the kidnappers left Ten Forward with some of the hostages, including Keiko, she asked the kidnappers for permission to leave Molly in the care of Diana Giddings. The family was later re-united in sickbay after Miles O'Brien had been freed from the influence of the aliens. (TNG: "Power Play")
In 2369, Keiko visited the planet Marlonia where she found a specimen of Draebidium calimus, which she brought back to the Enterprise on her return trip. Moments before docking on the Enterprise, their shuttlecraft, Fermi, became enveloped in an energy field, and their subsequent emergency transport caused her body to be changed into a twelve year old. While Keiko's body was still older and larger than Molly, the difference was noticeably less, and Molly had trouble adjusting to this change, refusing to acknowledge Keiko as her mother. This noticeably upset Keiko and probably motivated her decision to assume her previous age, so that she would be accepted as a mother to her again. She was eventually returned to her normal state and was accepted as a mother by Molly again. (TNG: "Rascals")
On Deep Space 9
Miles often told Molly bedtime stories. One of her favorites was "Rumpelstiltskin". However, later Rumpelstiltskin appeared in Molly's room and wreaked havoc on the station until the crew realized he was a figment of their imagination. Before being defeated, Rumpelstiltskin offered to save the station in exchange for Molly. Miles was reluctant, but then the crew made a breakthrough and the O'Briens were allowed to keep their daughter. (DS9: "If Wishes Were Horses")
She attended a day care on the station. She went through the phase of not wanting to be near her father, and when Miles O'Brien, believing he was her father, offered to drop her off at day care, Keiko said she was taking her to school with her so that Molly could experience a Vulcan program that taught basic problem-solving skills. (DS9: "Whispers")
Molly went with her mother on an agrobiology expedition that lasted several months. When she returned, Miles was eager to spend the two days he had with her, but Molly wasn't feeling well, thanks to the large amount of candy that was given to her by Ambassador Lwaxana Troi as they traveled together aboard a shuttle from Bajor. After she was prescribed some medicine by Doctor Bashir she fell asleep. Later, she said she felt "lots better." The day after, Molly again left with Keiko for half a year more of the trip. Miles told her to take care of her mother for him. (DS9: "Fascination")
Some six months later Molly, along with her mother, returned to Deep Space 9 from Bajor where she'd acquired a Bajoran doll named Lupi. Molly was the one to tell her father that Keiko was pregnant again, this time with her little brother. Miles was looking forward to spending a lot of time with Molly, and tried to teach her how to play darts. While Molly had a good aim, she grew bored with it and opted to color instead. When she drew a pony, Miles asked if it had a name, but Molly said she "didn't know." (DS9: "Accession")
Molly loved to color, and often did so after dinner. She was, however, in charge of putting her plate in the replicator. She attempted to show Miles one of her drawings, while he was dealing with the experience of heaving two decades of time in prison 'imprinted' on his memory for a crime he hadn't committed, but he got irritated and lashed out at her. She began to cry, and when Miles tried to apologize, Molly was too upset to listen. However, she later forgave her father, and welcomed him home with a hug and a "Daddy's home!" (DS9: "Hard Time")
In 2373, Keiko went on a five-day trip to Bajor. During this time, Miles was to care for her plants. However, in a combined effort with Julian, he managed to kill a species of plant. Molly left her room and saw the dead plants, and warned her father that he would be in trouble. When Miles suggested that Molly be the one to break the news to her mother, she responded, "Not me!" After Keiko returned, she threw Miles a surprise birthday party. Molly was present, and wore her new purple shoes just for her father. She also contacted her father at work to say hello. (DS9: "The Assignment")
In 2374, while on a picnic with her parents on a nearby planet, the eight year old Molly fell through an energy vortex. When the crew arrived to help, it was determined that she fell through a time portal 300 years into the past when the planet was uninhabited. When Chief O'Brien reactivated the portal, the calculations were off by ten years, and an eighteen-year-old version of Molly appeared.
Without Human contact for ten years, she had become feral and had a difficult time adjusting to life on Deep Space 9. Molly was homesick for her planet, and the O'Briens tried to recreate the environment that Molly was used to in a converted cargo bay. At first she made progress, but later became unmanageable. A Federation Magistrate wanted to commit her to a special care center. The O'Briens decided to return her to the planet and send her back through the portal knowing that they would never see her again. However, when Molly went back, a flaw in the O'Briens' programming of the portal meant that she arrived in the past at the same time as her eight-year-old self, subsequently sending her past self back through the portal to be reunited with her family. (DS9: "Time's Orphan")
Molly's younger brother, Kirayoshi (nicknamed "Yoshi"), was born in 2373, having been carried by Kira Nerys after a shuttle accident. During this time, Molly sometimes referred to Kira as her aunt. (DS9: "Body Parts", "The Begotten")
Both Molly and Kirayoshi moved back to Earth with their parents in late 2375, when Miles accepted a position as Professor of Engineering at Starfleet Academy. Initially, Molly wondered if they were not going back to Earth, because Miles had not informed Julian Bashir, his best friend. However, she was told that they were indeed going. Molly also showed interest in her father's model of the Alamo. When Miles warned her not to touch it, she retorted that she let him play with her toys. (DS9: "What You Leave Behind")
Molly O'Brien was portrayed by Hana Hatae; the adult version of Molly was played by Michelle Krusiec, while the infant Molly was played by the Tadeski twins. (This was done as lookalikes are often used to lengthen or ensure the best filming availability for both infants and animals onscreen.) Hatae was born in 1988, but the birth of Molly and her reappearances as a baby were filmed in 1991 and 1992.
Molly's first name was a tribute to two people: former Star Trek production staffer Molly Rennie, and Molly Berman, the daughter of executive producer Rick Berman. (Star Trek Chronology; Star Trek Encyclopedia (4th ed., vol. 2, p. 97))
Molly O'Brien was mainly seen on screen as a baby during the fifth season of TNG but inexplicably was old enough to talk when re-cast with Hana Hatae during the sixth season. Later that year, Benjamin Sisko stated that she was three years old in "The Nagus". By the second season of DS9–which aired simultaneously with the seventh season of TNG–her age was explicitly stated to be four and, towards the end of the season, five. (DS9: "Cardassians", "Crossover") By the sixth season of DS9, Kira Nerys says she is eight years old. ("Time's Orphan"). Molly's age appears to be an example of a continuity error known as "Soap Opera Rapid Aging Syndrome".
Molly and Keiko play a part in the novelization of DS9: "Emissary", with Keiko briefly losing track of Molly during the Cardassian attack on the station until she is found by Odo, Keiko warmly thanking Odo for his help despite Odo's discomfort.