OK first of all, Sakamoto Ryoma haven't made an appearance in RK except for being mentioned by Takasugi and Katsura in the Flashback chapters. However, he played quited an important role in the Restoration movement, and his life story may add some insight into the historical background of the times in RK His greatest contribution was to make the league between Choshu and Satsuma possible - a tremendous feat, since Choshu and Satsuma had been bitter rivals for generations, and Ryoma himself was denounced by his own clan, Tosa, not being recognised as a samurai at all.
Ryoma was born into a rich merchant family, his father being a goshi (village samurai, a samurai of low status) at the same time. Ryoma was the youngest among 5 children. He had 1 elder brother, and 3 elder sisters. The year of his birth was also the year when Halley's Comet passed close to the earth, and his 3rd and youngest sister, Otome, a bold and boyish lass, was up on the roof looking at it on the night when Ryoma was born. She imagined that she'd seen a dragon, then a horse in the long tail of the comet. When Ryoma was born later that night, she gave him the name accordingly.
As a boy, Ryoma was timid, gentle, slow in his learning both academically and physically, and was notorious for being a cry baby. His sisters gave him extra coachings in literature and kendo, but it all seemed a waste of time since he just couldn't perform well. Only his mother understood him to be a gentle, kind boy who didn't want to hurt anybody, while the others thought him a general disgrace to the family. During Ryoma's childhood, he made fast friends with Okata Izou, the future hitokiri, and Takechi Hanpeita, who would grew up to be the future leader of the Tosa Shishis.
Ryoma's world was turned upside down when a tragedy occurred when he was 10 years old. During an outing of the daimyo, he was invited to join in the procession by a girl his age of noble descent, whom he had befriended. During the procession, one of his more humble friends, a little kid who caught fish to sell for a living, saw Ryoma and in his delight, ran up to him. His dirty, lowly appearance and audacious behaviour startled and annoyed the daimyo, of course, and the child, along with his other friends were slashed to death immediatly. Little Ryoma lost his self-control and tried to stab the daimyo. He was only saved from death penalty by the poor girl's pleas. Instead, Ryoma was dragged back to his home, where his whole family was reprimanded for his misbehavior. He was then locked up in the attic, supervised by the daimyo's men, who were to make sure no one was to give him food.
Ryoma's mother slipped past them to give her son some food, and when he asked her where he had gone wrong, she replied, "You did nothing wrong". This infuriated the guards, who then dragged the bold woman off to prison after giving Ryoma a good beating. A few days later, Ryoma's mother, who had long suffered from tuberculosis, died in prison, and Ryoma was granted a pardon. Ever since then, Ryoma changed, became stronger in every aspect so as not to let his mother's faith in him down. I think it was then that he decided that one day, he would bring about the collapse of the class system, so that daimyos will no longer be able to throw their weights around and cause the people to suffer. This was especially more so in Tosa, where although goshis were allowed to bear katanas, they were not considered proper samurais by samurais of higher birth, and were deprived of many privileges. In fact, many goshis lived their life as farmers. Ryoma's family was luckier because they were a merchant family and were thus quite rich.
From then on, Ryoma excelled as a swordsman (though not as a scholar), but he'd never killed anyone in his entire life. He and his childhood friends leapt on to the national stage to play their parts in the revolutions, though many of them came to tragic ends.