Uniformity is a problem no matter where you find it. Planet, flora, fauna, people, culture, at every level. Glenda remarked that diversity issues in a secondary world may not be the same as those in our world - and that's one of the great things that a writer can do with a secondary world. You just need to be very specific about what you intend to do with the parameters you create, set up the culture to be supported by the environment, and "hang lights" on it. Also, if you are working with humans, you need to address the problem of skin color and ethnicity in some meaningful way.
I spoke about how I struggled to address the question of skin color because I had already posited a population that was highly genetically mixed and which lived underground. In the end, though, I was able to find a way to deal with skin color, which would still express itself in the phenotypes of individuals and would have to mean something specific. In the Varin instance, skin coloration intersects with caste identity in that the castes who work on the surface are the most likely to have a thoroughly recognizable skin coloration.
Of course, skin color is not the only physical indicator of different ethnicity - there are also things like eye or nose shape, hair texture, etc. that can be mentioned.
Religion is another important parameter on which one might expect to find diversity. With religion, the link to physical features is less direct. It is also important to ask how people deliberately mark themselves as members of a social group (Houses, clans, or clubs, cliques, etc).
I highly recommend Nisi Shawl and Cynthia Ward's book, Writing the Other, for valuable insights.
Do your research as you build worlds! Where does diversity come from? How does it develop? Who are the traders? Who are the mercenaries? Why do people travel?
io9 recently had an article about bad worldbuilding, and one of the things they suggested getting rid of was planets with only one biome, i.e. the "Single-Use World" - all ocean, all desert, etc. The article is here. Different regions have different climates, and different climates provide for different resources, which makes for different cultures.
Furthermore, make sure also to think about your world's history. History casts a long shadow. If there are empires in your world, that means there will be imperialists, and there will be a history of conquest that leaves footprints in how people view each other.
Think about gender, gender roles, and gender identities also when you are considering diversity. Think about how these fit into your world. Whether you are trying to invent an entirely new gender system or not, the categories you create will not be clean and uniform.
Think also about age diversity. Are there children? Where do they fit and what are their lives like? How are they regarded? Are there elders? Where do they fit and what are their lives like?
Think about socioeconomic status. In all likelihood, there will be differences between rich and poor. Even in a society that strives for economic equality, people will strive to differentiate themselves. How?
Diversity has something of a fractal structure. You can find it at all different levels. Take a single society, for example; it will contain social groups. There will also be social divisions within those social groups. Even single individuals can be multicultural. As Glenda mentioned, there are also situations where people are nominally equal, part of the same group, but in practice they are not really part of that group. Intersectionality - the coexistence of multiple parameters on which variation occurs - can be at the root of some of that diversity.
Deborah Ross told us about some of the diversity in her trilogy, The Seven-Petaled Shield, where she has societies based on 1. a Scythian or Mongol horse-based model, 2. a highly literate Semitic model, and 3. a Roman model. Within this larger framework, she also includes smaller groups of various types.
People don't necessarily agree on anything. Given any set of established roles, there will always be people who step out. How do they do it? Skin color, given that it is linked to geographic origin, it is very likely to have some important influence on culture. But perhaps it is not the most critical distinction in your society - what is that most important distinction? How does it interact with skin color and other cultural variation?
Is there a "default"? Falling back on pseudo-western-European models is clichéd and problematic. Relying on stereotypes of noble peasants or savages, etc. is insulting (not to mention boring).
Things get a lot more interesting when people with different sets of assumptions must learn to work together.
Disability is another parameter you should consider when looking at diversity. Not everyone in your society will have perfect health. How does society deal with that? What kinds of accommodations are made?
We touched briefly also on general biodiversity. It's important to think through whole ecosystems with their plants and animals and not just use a few tokens. As you create your world, look for places where a single situation can allow you to go into great detail, thus implying the presence of great detail in other areas of your world. Implication can take you a long way (which is one reason why you should also be careful with it! You can imply things without meaning to...)
Oversimplification can hamper the sense of reality in a story and thus the sense of enjoyment. The phenomenon of "alien of the week" is something like this, where travelers through space will meet up with some group of aliens and end up connected with a couple of "typical" ones. What is a "typical" alien? Can we define a "typical" human? Aliens would be similarly diverse, and so would space travelers. Our own International Space Station puts people of many different backgrounds together.
Here are some books that handle diversity well: N. K. Jemisin's Dreamblood series (I love the diversity of Gujareeh), Nnedi Okorafor's Who Fears Death (taking on ethnic conflict and genocide), and Saladin Ahmed's Throne of the Crescent Moon (another great diverse city environment). There are of course many others - Deborah Ross' The Seven-Petaled Shield comes to mind - so feel free to recommend more in the comments!
Look to the real world for your research and inspiration, because when it comes to diversity, there is no substitute for the richness you will find there.