I don't know that we've ever had a formal description of the Westeros rules for styling and naming, but it seems to be based heavily on medieval European customs. In that case, it would make sense for Cersei to retain her name, as she married into royalty.

Of course, the real-world naming and marriage customs are complex, vary from culture to culture, and change frequently. Things get even more convoluted when you add in the inheritance of the crown. But in general, most medieval European cultures followed rules that were similar to the following:

When a woman marries into a titled family (the only people that had proper "last names"), she takes on her husbands name. This is because she is leaving her old family (where she was of her father's house) and joining a new one (her husbands house.) Formally, they would be styled "Lady Catelyn, of House Stark", just like Ned is "Lord Eddard of House Stark", but in everyday usage they would be Ned and Catelyn Stark.

(In practice, the rules here vary a lot based on the situation. The Westeros example given in a previous comment had Genna, a Lannister, marrying a Frey. Depending on the current relative social/political standing of those two houses, she may choose to maintain her father's house name in common speech, though she would still be Genna, nee Lannister, of House Frey.)

When the man is royalty, however, the rules are different. A woman cannot become royalty by marrying into it, in the sense that they do not gain all of the privileges that a royal name has. Specifically, a woman who marries a king/prince cannot become Queen in her own right -- her daughters can, but she cannot. As such, while she becomes a member of the royal house, she doesn't "take on" her husbands name.

If you look back through English history, we can see plenty of examples of this convention. In particular, ASoIaF is based roughly on the historical War of the Roses, which saw the Henry Tudor become the first Tudor king. Henry VII's son, the famous Henry VIII, would also have been named Henry Tudor, but his wives are still referred to as Catherine of Aragon, or Anne Boleyn. In modern England, woman who marry into royalty don't actually use a surname; e.g. Catherine Middleton now simply Catherine, nee Middleton, Duchess of Cambridge, since her husband is, among other things, the Duke of Cambridge. But, in informal conversation, and even in some media outlets, she is still often (incorrectly - see below) called "Kate Middleton", likely as a throwback to the historical naming convention.

In this sense, we can imagine that Cersei's full legal name while Robert was alive might be something like Her Majesty, Cersei nee Lannister, of House Baratheon, Queen of the Seven Kingdoms -- shortened to Queen Cersei Lannister.

I don't remember much about the other queens we've seen, or heard about, on-screen thus far but I think they fit this pattern. Stannis' wife, by this custom, would not take the Baratheon name as it was the current royal family when she married, and I only remember ever hearing her named as "Lady Selyse" or "Selyse Florent". Robb's wife is mostly just called "Jeyne" by Robb and Cat, but I don't remember anyone ever referring to her as Jeyne Stark. Margaery married two Baratheon kings and was still "Margaery Tyrell", and I don't know of any case where Rhaegar's wife was named as "Elia Targaryan".

--

Unrelated side note, just to show how complex this stuff gets:

Referring to the Duchess of Cambridge as "Catherine Middleton" is not just impolite, it's flat out wrong. She should be addressed as "Princess Catherine" in all cases, but her "legal" surname is a matter of some confusion. Queen Elizabeth and Prince Charles would give their surname as Windsor, if required. Queen Elizabeth has specified that her non-royal descendants will take the surname Mountbatten-Windsor, which shouldn't apply to Princess Catherine. However, when she needed to file suit in a foreign court, she gave her name as Mountbatten-Windsor, as did her husband. So, clearly, what to call the wife of a royal family member is absolutely not a straightforward question.