When Jaime Lannister and Bronn go to Dorne for saving Myrcella Baratheon in Game of Thrones, then Myrcella Baratheon at one point in S05E10 says that she knows
is her dad. Exactly how does she come to know this?
It is not shown clearly on the TV show, however it seems like kind of common knowledge among the small council (Varys, Littlefinger) and the palace. People choose to ignore or acknowledge this based on their interest. Now Cersei is on trial for the same and Stannis also has shared this information to all the lords. She may have suspected the incestuous relationship based on rumors and the letters Stannis spread all over Westeros from the very start.