One of Tolkien’s most impressive achievements is that he convinces the reader that the mistakes which Sauron makes to his undoing are the kind of mistakes which Evil, however powerful, cannot help making just because it is Evil. His primary weakness is a lack of imagination, for, while Good can imagine what it would be like to be Evil, Evil cannot imagine what it would be like to be Good. Elrond, Gandalf, Galadriel, Aragorn are able to imagine themselves as Sauron and therefore can resist the temptation to use the Ring themselves, but Sauron cannot imagine that anyone who knows what the Ring can accomplish, his own destruction among other things, will not use it, let alone try to destroy it.
This is from W. H. Auden's review of The Lord of the Ring, which is arguably still the single best discussion of the work. On the temptation point, I think it's a bit more than this, though. It's not just that Galadriel and the others are able to imagine themselves in Sauron's place; it's that they can imagine the story of their own corruption. Galadriel knows the mind of Sauron with regard to the Elves, but she would never under any plausible course of events become just like Sauron. But she can recognize what she could become, step by step and bit by bit, and see it for what it would really be. This is not imagination in the sense of images in the head or feeling in the chest; it is instead the very strategy that constitutes virtue, one of the essential acts of prudence without which virtue can never come to completion. By it the Wise trace out all the courses before them. But Sauron's strategic imagination, formidable as it may be, is corrupt, more cunning than prudence, and because of that it can only look towards one thing, the domination of others, and where this is not the governing theme, where the Wise refuse to fight on Sauron's terms and in Sauron's ways, he can understand nothing -- at least, until it is too late, and disaster has already come to Mount Doom. Evil always takes itself to be the inevitable course, the only desirable course, the only intelligent course; it doesn't have the sort of strategic imagination required to see that there are better ways. If it did, it would begin to reform.