Last week J.J. Abrams told us he was thinking about Palpatine as far back as The Force Awakens. But was there a moment writing the script for this where there was an "a-ha" moment of bringing back Palpatine?
More at the link
Oh, geez, I should probably steer away from specifics on that stuff until after the film comes out. Then I'd love to talk to you about it in detail. I'm afraid anything I'd say about it would give away some plot stuff and I'm not as fleet of foot as J.J. at avoiding stuff. But, what I can say is we felt that this story, these nine films, were a family saga. We decided pretty early on that we wanted to really think of this as the Skywalker Saga. And from the beginning, the chess game has been between Palpatine/Sideous and the Jedi. Specifically, the Jedi as represented by Anakin and the Skywalkers. So, we were convinced someway or another Palpatine had to be a presence in this film.
Of course, the sacrifice of Vader at the end of Return of the Jedi and bringing balance to the Force, we still had to honor that and I think we do honor that in the film. We don't take the end of Return of the Jedi lightly at all, because it is one of the most beautiful moments in any film, really — in seeing what Vader does for his son. Return of the Jedi was the first movie I ever saw in a theater, and I remember just being rocked by what I saw in that moment. Because it almost never had occurred to me as a kid that the bad guy could cease being a bad guy and be a good guy. That moment when Vader lifts Palpatine was a genuine shock to me and it's full of truth and beauty. We had to be careful about that, but if you look at some of the lore of Palpatine and the Sith and the way that George has embedded ideas about the Sith into the mythology of Star Wars, there are ways the presence of that character can still cast its shadow in the future. I guess I'll leave it at that.
More at the link