Off the top of my head, Robert E. Howard, Michael Moorcock, and Fritz Leiber are all necessary reading.
Howard because, well, if you’ve never actually read the Conan short stories, you need to. He’s one of the founding fathers of modern fantasy. Without him we wouldn’t have the sword and sorcery genre at all. Any fantasy you read that isn’t Tolkien owes a huge debt to Howard. I’m sure we’ve all seen the Boris Vallejo artwork, and we do all know the trashy reputation Howard’s work has, but his writing was actually remarkably concise and clear. His worldbuilding is a weird pastiche of history shoved in a blender, but for heroic fantasy, it’s necessary reading.
Leiber’s Fafhrd and the Gray Mouser is, in many ways, the origin of urban fantasy. It’s not fantasy in modern day, but fantasy in an urban environment. Lankhmar was the New York Leiber knew, even if he did file the serial numbers off and set it in a less technologically advanced era.
Moorcock is the origin of dark fantasy. Without him, we wouldn’t have Game of Thrones, The Witcher, or the wave of fantasy writers who think smearing everything in blood is “dark.” So, you know, mixed results. He was criticizing the heroic fantasy genre. Specifically his Elric of Melniboné novels are a direct response to Conan.
I’m going to toss H.P. Lovecraft out there before someone else suggests him. He’s got a hell of a following, but, well, his prose is bad. He abuses adjectives in ways science never thought possible, and might accidentally make a few new ones on the way through. He’s also the father of modern horror and racist as hell.
That’s not two separate statements, Lovecraft’s xenophobia is the cornerstone of his horror, and you can’t really extract it from the work without also removing the horror. He’s still worth looking at, and the foundation of mixing horror and fantasy, but, you’ve been warned.
In the less foundational range, I have a soft spot for Andrzej Sapkowski’s Witcher novels (I’ve never really been able to get into the games.) There’s a philosophical bent to novels that chews on a lot of assumptions about modern fantasy, and modern heroic fiction.
For world building, the best source is, oddly enough, role-playing games. Well written RPG guides provide the player with a toolbox to use in their story. Really good ones show enough of the worldbuilding to actually give you some insight into doing it for yourself.
One of the reasons I keep recommending Exalted is because the books spend a lot of time explaining why the setting works the way it does. The books aren’t just a series of, “…and here’s a neat little thing,” it’s a lot of explanation for what causes that neat little thing, and mixing human nature with fantastic elements.
If you just want settings with neat concepts, and a large volume, D&D is an excellent jumping off point. There are a ton of campaign settings ranging from horror, Tolkienesque high fantasy, post apocalyptic, urban fantasy (both in the Leiber sense and modern day with monsters) and some stuff that’s really hard to categorize.
The actual guides themselves are all over the place. I mean, this is an imprint that’s passed from TSR to WotC, and gone through five or six different iterations. It’s been worked on by a huge swath of writers over the decades. It doesn’t describe a single setting, rule system, or thematic element.
D&D guides do have a bad habit of being overly systemic. That is to say, D&D is very stat heavy, and depending on the book, you might only have one or two paragraphs of useful information per page, with the rest being massive stat blocks and/or art. If you’re familiar with the game, then that information might be useful, but if you’re not, then it’s just going to be an intimidating wall of numbers that doesn’t really provide anything useful.
That said, getting basic information on the settings is remarkably easy. Because of how massive the settings are, there are entire wikis dedicated to a lot of D&D campaign settings, so you don’t actually need to go digging for the books.
Of the top of my head, some of the settings worth looking at are: Dragonlance, Dark Sun, Planescape, Forgotten Realms, Ravenloft, Spelljammer, and Eberron.
Depending on what you’re doing, Planescape, Spelljammer, and Ravenloft all deal with traveling between different worlds, so that might not be a list to start looking at.
There’s also a lot of tie in fiction for D&D, though I’m not particularly well versed in it. Off hand, Margret Weiss and Tracy Hickman’s Dragonlance novels are top notch. By reputation, R.A. Salvatore’s Forgotten Realms novels are also very good.
That should be enough to get you started.