When you begin planning a narrative, in particular one not set in the "real world" you need to consider the environment your characters occupy. Everything from the culture, to the landscape, could become important, and you don't want to be writing then suddenly realise you have no idea what type of religion a region follows when it becomes relevant. This kind of thing can throw you off your stride and really put the brakes on your progress. Even if you are remediating a pre-existing world, you still need to consider all elements of it, what you are going to bring from the media form the world currently occupies, and how you will implement them in the media form you are adapting it for. In this case we will consider scripts for film and television.
To start with you need to consider the setting, comparable time period and the visual aspects of the wider world. This gives you a grounding to begin with and build on top of. If the world isn't the "real world" is there a historical time period on Earth that is comparable in style? What is the climate like? The extreme detail of these aspects isn't important at this stage but the basics need to be solidly set out in order to build on top of.
If you are working on a fantasy, that has magic and dragons, you still require a grounding that the audience can relate to. If you look at Lord of the Rings for example, the different races and elements of the story are very far removed from reality, however the different races and areas have grounding in the real world. The Haradrim have a Middle Eastern aesthetic based roughly around the time of the Mongol Empire in the 13th century. Rohan and the Rohirrim are definitely inspired by the Germanic peoples; they use Anglo-Saxon names and imagery to list a few examples of why. Despite being fantasy, clearly apart from the real world, there are similarities which help the audience engage and become immersed. The audience suspend their disbelief and accept the unrealistic aspects of the narrative. The elements of realism helping ease them into this mind set.
Okay, so you have decided on the basic foundation of your world, the hard part of placing it in such as way is done. Now you add in more detailed elements, which is actually easier in a way, once you decide on an element you can focus in on just that. Occasionally Depending on your narrative some of the elements I am going to list may not be needed, but it's useful to consider them, even if you decide to discount them.
History - Be it of the nation, or if relevant, the continent or even the world. A backstory to help steer the narrative and the choices made within it. Why are two nations enemies, why are a group so opposed to another? These facts might never make it into the main story, but they help bring a depth to your characters and choices by the fact they exist and give more of a reason for your choices than merely 'because I said so'.
Calendar/Time Functions - Now this is one that will be less relevant for most people than others, however for those who want to create a world that is perhaps in a different universe or on another planet time can be important. To assume time periods such as days and years are the same length as on earth can be distracting to certain audiences. Ensure this is considered if relevant to your world.
Government - It could be argued that a culture or society that has no form of government or leadership system doesn't exist, at least not in a context we understand as human. To that end you need to consider this when creating a world. Even if your story is in no way based around a political body or even makes reference to it, it is important to consider how a place is governed. The reason for this being that laws affect how out a character interacts with the world and the consequences for their actions.
Religion - Does your world have a religion? Is it important to note that it does or does not? These are choices that will depend on the situation. Sometimes no mention of religion is mentioned and it is not necessary to state that there specifically is, or is not, one. However, often you will need to at least have a basic grasp of the religion of a place. If there has never been one, or it died out millennia ago would phrases like "oh my god" still be used? Even a seemingly innocuous, simple, piece of dialogue such as that can cause you difficulties without properly considering the wider settings religious situation.
Technology - No matter how advanced or mundane the technology of your world, there will be some. From the rocks cavemen use to hammer things to the ray guns of the distant future, you will need to have an understanding of your world's technological capabilities in order to be consistent and accurate as your progress through the narrative.
Key Events - If your narrative requires key historic events to have occurred, or indeed if even one character has a key event that needs to be considered for their role in the story you should outline it in full in the planning stage. Even if this event isn't directly referenced in your story it helps to know about it in detail as it can assist in creating a character's personality or in creating a situation. A dialogue between two cities, who have previously been at war, for example. The events of the war, that the leaders may very well has been directly involved in, will influence their communications. Even if the war itself is not in the narrative you write.
Key Organisations/People - Like key events, key organisations and/or people, even if not directly involved in the narrative can be very important and a writer should definitely define them, even if they are confined to the planning stage and world notes. Just like key events, a key organisation or person can influence the world deeply so even stories that are far removed from them can be effected by them.
As you can see there is a lot to consider when designing the world, and most of this will not make it into the narrative you created in this world. But without such an in depth view of things to work from, I firmly believe that a narrative you spin will be much less engaging for an audience. If you write as if this place is real, the story, the characters and the events will feel more real to you and, by design, your audience.