Really, aside from making the setting interesting, and credible/believable, with internally consistent rules and logic, the big thing is not to overdo it early on.
By all means develop your world as you would a character, by giving it some thought. What's the geography of the world - climate, landmasses, national boundaries and urban centers? What is the culture of each area? What kinds of people live there, and what (in the case of a fantasy) separates these groups from typical 'humans' physiologically or culturally. What is the history of the world and what pivotal events have taken place there leading to the current situation? What are the broad beliefs, traditions, and ideas in this world that make it unlike our own? What do the animals and plants look like and in what ways, if any, are they different from our present-day Earth? What about technological change - how primitive or advanced is this world? Are there some parts of the scientific landscape that are further away from our Earth's state than others? (Medical, computers and electronics, transportation, communication, space travel, etc). What kind of planet is this, i.e. is it circling a binary star system, does it have no moons or many? What other worlds, if any, are detectable or even accessible from this one - and are any of those inhabited and thus requiring a separate history/geography/culture? Are there any unique abilities your world's denizens have that we do not, i.e. magical, supernatural, technological, genetic? Is this fantasy or science fiction? The broad strokes difference is that fantasy contains and emphasizes elements unexplained by traditional scientific logic (i.e. magic or gods) and science fiction argues that everything in the world is explained through scientific/technological acheivement, no matter how far-fetched that might in some cases be. At times the line between these two genres blurs, what they have in common is that they exist in a world that is not in 'our' world (present day or documented history) but in a speculative imagined one. Superhero movies, therefore, though typically set in the present-day time period, are set in a world that has variations from ours, and are therefore 'fantasy' if those differences are not explained through technology / science and 'science fiction' if they are. Note how much of our narrative landscape lately has become dominated by the fantasy and science fiction genres, how much of our entertainment - often very popular entertainment - is set in worlds that differ from our own.

This said, although fantasy/science fiction are popular, and people do enjoy escaping to imagined worlds, the core story must not be frontloaded with a ton of exposition about the world you designed and its history. It's better to just thrust the audience right into the world and fill in the intricacies of it gradually as they become relevant to the story. Only mention another part of the world or a detail in it, when it matters to the characters and can affect their lives/actions. Filling these things in a bit at a time is a very good idea as it doesn't slow your story to a crawl. And one other note when we discuss pacing: start with a hook. Begin your story by raising an interesting question/unknown, a clever turn of phrase relating to the characters and situation, or with an action sequence, or a striking visual, or something that will grab attention immediately. Then build on that, and just pile on tension as you go, keeping things moving and filling in details of the world only once they have impact on the characters, only at the point when those details are relevant and important. Entering a new location to do something? Then and only then concisely describe that place. Noting a historical event or cultural detail? Well, how does it affect the characters? Because it probably should be significant to the plot or one or more people in it; otherwise it doesn't need to be mentioned. We can discuss a bunch of wildlife, and a desert in your world, or we can say that the wild animal attacked the heroes as they crossed that desert, and then suddenly that detail of the world matters and is not 'dry exposition'. And in any fiction, attention spans are short and if you don't grab attention early, you'll lose your readers/viewers. Don't waste readers' good will with a prologue that explains the history of a world unless that prologue is brief, exciting, and introduces some of your characters, directly setting in motion the conflict they'll deal with. In other words? The best prologue is not a 'prologue' at all, it's the fast-paced first scene of the larger story.

Ads on TriumphantArtists.com and other websites run by Matthew Hornbostel, include banner ads from Comic Ad Network [top ad - an unfiltered banner rotation system predominantly used by web comics, art sites, but occasionally some questionable items.] and my own banner rotation system [bottom - anything here is either my own stuff like websites, online shops, or social media profiles, or has been vetted by me and found to be generally legit. I have several cashback sites [all of them are ones I've used and cashed out tens of $ from successfully already] and major online retail stores [Sony, Microsoft, Amazon...] in that mix. Usually they give me some sort of small compensation if you buy from them through the link, which I'm disclosing right now. They're all legit spots, but if skeptical do your own research before committing to anything.]