All fiction genres share the same building blocks. They must have protagonists, antagonists, a goal, conflict, and themes. Only science fiction and fantasy add a step to these elements: world building.
In my experience, shoddy world building is the second most common cause of poor storytelling right behind underdeveloped characters. Some people harbor a naive view of world crafting in which rewinding time to the bronze age and introducing dragons suffices to ground a fantasy setting.
Much like writing believable characters, solid world building takes finesse. If the structures and rules of your secondary world depart too far from the reader's experience of the primary world, you risk breaking his suspension of disbelief.
On the other hand, an effective fantasy world must be able to foster and maintain escapism. Offering the reader vicarious adventure beyond the confines of reality is the whole point of speculative fiction. So the setting has to include at least one major exotic element: magic, geocentric cosmology, androids, FTL travel, etc.
Creating a sound secondary world is a tightrope act. Lean too far one way, and the audience can't relate. Lean too far the other way, and the setting becomes too dull to hold their attention. The best way to avoid both extremes is to lay a foundation of internal consistency.
Figure out how your secondary world most differs from the primary world. Is your world separated from ours in time? Is it another planet in the same universe? Is it in another cosmos altogether?
The answers will indicate how much your world's rules may differ from those of the primary world. (For example, since my fantasy setting is located in another universe I avoid using words derived from earthly people, places, and events.) Once you've set these standards, don't deviate from them unless the change results from natural story developments. Much like symbolism, world building is most effective when readers don't consciously see it.
That's my approach to world building. What are your picks for best/worst designed sci fi/fantasy worlds?