They are massively rich and have powerful connections, etc.
Why is it they have not stolen Robert's throne previously?
NB: I have not read the books and have only seen the TV series.
Movies & TV Stack Exchange is a question and answer site for movie and TV enthusiasts. It only takes a minute to sign up.Sign up to join this community
You could probably write a pretty long essay on this, but essentially putting a Lannister on the throne after the previous king's demise would've been very problematic. (and prior to that the regency was passed down through the Targareyen line due to their dragon's blood, which is how their came to be a king in the first place) Mainly because:
Getting a queenship out of the deal was actually a step up from the previous regime, where Cersei had been spurned and Jaime had been co-opted into the Kingsguard, and hence unable to marry.
The Lannisters are indeed a strong and wealthy family, but they are also mistrusted by the other great families. So if they tried to take Robert's throne forcibly the other families would unite against them. In the TV series the Lannisters have trouble facing only three of the great families (The Starks, Baratheons and Tullys), so if you add the rest of the families (The Tyrells, Martells, Arryns, and possibly the Greyjoys) that makes for an impossible to win situation.
So the only way to get the throne was through subterfuge. Assassinating King Robert so blatantly would throw too much suspicion on them, that's why the Starks suspect that the Lannisters assassinated Jon Arryn (King Robert's first Hand) hoping to replace him with Tywin or Jaime Lannister in order to take real control since Robert delegated all the actual ruling to his Hand.
But then Robert picked Ned Stark instead, and Stark was shaping up to be a very anti-Lannister Hand. Starks were now hounding them both politically (through Ned Stark) and militarily (kidnapping Tyrion). It was then that the Lannisters knew that they had to act now, or risk losing power (or more). Thus the move to eliminate King Robert and replace him with a Lannister puppet.
They did have the power!
Tywin Lannister was Hand of the King to Aerys II "The Mad King" Targaryen. The history is quiet involved and not explained much or at all in show, but Tywin eventually lost the position as the Aerys descended into madness. So for a time Tywin was the second most powerful man in the Seven Kingdoms.
Prior to Robert's Rebellion it would have been foolish to directly challenge the Targaryen's directly as they had centuries of alliances built up. For a time they even had dragons. Being Hand of the King was the highest position someone who was not a Targaryen could obtain.
So why did the Lannisters not overthrow Robert sooner? I would say "Why would they?", but more specifically "Why would Twyin?" as he is the head of his house. The first major act after winning the Rebellion was to take Cersei as his queen. This again makes House Lannister as the second most (politically) powerful house in the Seven Kingdoms. Robert then borrows absurd amounts of money (3 million gold dragons) from the Lannisters. This a great way to pull Robert's strings if they ever need to. Tywin basically already has control of the Crown, but does not have expose his house to another war or to any bad publicity as acts from a layer of separation.
Tywin's own grandson will also be King one day. Under normal circumstances Tywin may have never seen this for himself, but then again he was always planning for his dynasty. Setting up all future Kings to trace back to the Lannisters is good way to do this.