The main character was a cleric or priest of a religion which worshipped either fire generally or the sun specifically. He was losing his faith because the sun was gradually getting dimmer, but there's a scene where he meets a salamander in a cave and his faith is restored (I believe he gains more powerful fire magic at this point).
Other details I can remember are that he eventually travels to a city which is besieged, and I believe the villains were necromancers. There is definitely at least one sequel I remember being advertised in the back of the book, so it may be part of a series. I believe the sequel had something to do with finding a bronze statue in a labyrinth.
I read this book sometime before 2009, so that's the latest it could have been published, but I wouldn't be surprised if it came out in the 80s or 90s. I've searched through several lists of official Dungeons and Dragons novels without finding this one, but it definitely uses a lot of D&D tropes. I've also searched through lists of novels in the "Dying Earth" subgenre, but I haven't found the one I'm looking for, and I don't recall any science fiction elements in the story.