In the pilot episode, Myrcella was a non-speaking role played by Aimee Richardson. She was not originally intended to be cast as Myrcella: no casting decision had been made yet, and she was simply a stand-in for the auditions involving other cast members, such as Cersei and Jaime. However, the TV series creators discovered that they enjoyed Richardson's strong acting ability, so they decided to officially cast her as Myrcella. She initially appeared as a guest star in the first season and returned in this role for the second season.
Richardson won't be appearing in Season 3 because Myrcella has been sent to Dorne, and thus had no scenes in the third book. As Richardson put it in a twitter post just after Season 3 began airing, she's "too busy getting a tan in Dorne to appear in S3."