At first glance Sauron does not appear to have much depth as a character. Fans of The Lord of the Rings are not treated to any touching stories of the young orphaned Tom Riddle, nor do we ever see the child who would become Darth Vader winning a pod race. He works rather well as a villain, but we are rarely given a reason to think of him as more than that.
Nor does he fare much better in The Silmarillion. To be sure, the reader gets hints to his backstory in the Valaquenta, making some sense of Elrond's statement that "nothing is evil in the beginning," (The Lord of the Rings, "The Council of Elrond"), but even this characterization does not raise the kind of issues that might entice a reader to think seriously about his motivation and character. What was he like before his association with Morgoth? Why did he rebel? What did Morgoth offer him that he wanted?
If this was all there was to him, I would have no interest in defending or even understanding him. He would function well as the evil overlord du jour, but I would expect nothing more from him. As with many of Tolkien's characters, however, they really come into their own in Tolkien's so-called minor works. In Tolkien's stories about the Second Age (Unfinished Tales, the Akallabêth, and Of the Rings of Power) we meet a Sauron with a good deal more depth than the one found in Tolkien's better-known tales.
At the end of Valaquenta, Tolkien gives this description of Sauron:
In the beginning he was of the Maiar of Aulë, and he remained mighty in the lore of that people. In all the deeds of Melkor the Morgoth upon Arda, in his vast works and in the deceits of his cunning, Sauron had a part, and was only less evil than his master in that for long he served another and not himself. But in after years he rose like a shadow of Morgoth and a ghost of his malice, and walked behind him on the same ruinous path down into the Void.
He's not portrayed as a praiseworthy character here, or even a particularly interesting one. If anything, he is overshadowed by Morgoth. The only detail unique to him, that he was originally "of the Maiar of Aulë," does not tell us much other than give the vague impression that he was a craftsman or scientist.
In his letters J.R.R. Tolkien gives more information about Sauron's origins. Writing to Milton Waldman, Tolkien describes Sauron as "a being of Valinor perverted to the service of the Enemy" (Letter #131). That word, being, carries a particular philosophical association. A being is a thing with moral worth, a person rather than a non-human animal, and therefore possesses a certain dignity. At a minimum a being can make decisions and impact the world. Moreover, by saying he is "of Valinor," Tolkien connects him specifically to paradise. Being of a certain place is saying that you came from that group originally; it is a more intimate, immediate connection. Finally, Sauron's later form is a perversion, implying he turned away from something good to become something bad.
Ultimately, Sauron is perverted and he does follow Melkor into Middle-earth. He probably played a role in most of Morgoth's machinations throughout the First Age, though he is rarely mentioned by name in the Quenta Silmarillion. (One exception is the story of Beren and Lúthien, where Sauron captures Beren and Finrod for a time.) However, we learn in Of the Rings of Power that "[Sauron's] power had been great" under Morgoth. It seems unlikely that he didn't play a role in other events involving Morgoth.
After Morgoth's fall, Sauron approached the Valar's emissary Eönwë seeking a pardon. Eönwë cannot grant the pardon because he and Sauron are ontologically equals (so Eönwë is not in a position to pass judgment, as he was with the elves). Still, the mere fact that Sauron asks for pardon shows that he is capable of repentance at this point. He does not want to accept punishment because he is afraid he will receive "a sentence, it might be, of long servitude in good faith" – but at least he does not want to be opposed to the Valar, at this point in time.
Tolkien does not say where exactly Tolkien went after this meeting with Eönwë. The Akallabêth does tell us how many of the men who served Morgoth fled east and set themselves up as kings over the men native to that region, and that those Men had taken the "friends of Morgoth" to be their masters. It's possible that Sauron is included as one of these "friends of Morgoth." He certainly has fortified Barad-dûr by the reign of the Númenórean king Tar-Minastir (SA 1731-1869), and he was a political force in the lands the Númenóreans tried to colonize.
Before Sauron becomes a great lord facing off against the Númenóreans, he deals with the Elves of Eregion in a rather different way. It's easy to think of Sauron only as an enemy general intent on dominating all the free peoples of Middle-earth. That model works well enough for his actions in the Third Age, but not for when he first meets Celebrimbor and Gil-galad.
Sauron first presented himself as an emissary of the Valar, not mentioning his specific identity, but Gil-galad and Elrond "doubted him and his fair-seeming, and though they knew not who in truth he was they would not admit him to that land" (The Silmarillion, Of the Rings of Power).They sent out messengers to all the elves of that region warning them about their suspicions, but few of their neighbors heeded the advice. Sauron found the elves of Eregion particularly willing to accept him as a friend.
Why were the elves of Eregion more open to Sauron than Gil-galad had been? Sauron's words to them are telling:
"But wherefore should Middle-earth remain for ever desolate and dark, whereas the Elves could make it as fair as Eressëa, nay even as Valinor? And since you have not returned thirther, as you might, I perceive that you love this Middle-earth, as do I. Is it not then our task to labour together for its enrichment, and for the raising of all the Elven-kindreds that wander here untaught to the height of that power and knowledge which those have who are beyond the Sea?"
If Sauron's words are disingenuous, he at least knows his audience. Lindon was one of the last remaining kingdoms from the First Age. Most of the survivors of the wars with Morgoth settled there after his fall, and it probably would have contained a good mixture of all the elves who fled to Balar as Morgoth gained control over Beleriand. Eregion, on the other hand, seems more purely connected with the Noldorin, and in particular with the Noldorin with a creative or scientific bent. Celebrimbor, the last remnant of Fëanor's line, was a lord among this folk, a character described in Unfinished Tales as having "an almost 'dwarvish' obsession with crafts." Whereas Lindon had a mix of all elvish races, Eriador is described as primarily (though not exclusively) Noldorin, and one of the main reasons it was founded was for elves who wanted to live close to the dwarves. I can well imagine it had the air of an artists' colony, people who were genuinely interested in discovery and invention. Sauron's promise of a land "as fair as Eressëa, nay even as Valinor" must have been enticing to this particular group of elves.
But should we assume Sauron was just telling this group of elves what they wanted to hear? He was a maia of Aulë, and it is entirely possible that being around so many of the Noldor reminded him of some experiences he had buried while serving Morgoth. It's possible, too, that he disagreed with the Valar's actions at the end of the First Age. They had left Middle-earth to Morgoth's domination back before the Elves' awakening, and the Akallabêth tells us that the Valar abandoned the men of Middle-earth once again, leaving Sauron and other servants of Morgoth to trouble those who chose to remain in Middle-earth. Sauron, if he had lived as a lord in the east, would have seen the practical consequence of that neglect, and he might have genuinely wanted to work with the elves to remedy it. If so, the elves of Eregion probably represented his best opportunity to do that.
In any event, the elves of Eregion do accept Sauron's friendship, for "they were not at peace in their hearts, since they had refused to return into the West, and they desired both to stay in Middle-earth, which indeed they loved, and yet to enjoy the bliss of those that had departed" (The Silmarillion, Of the Rings of Power). Sauron revealed his knowledge to them, and the Elves used it to master crafts that they did not yet know. The partnership was a success, and "in those days the smiths of Ost-in-Edhil surpassed all that they had contrived before; and they took thought, and they made Rings of Power."
Sauron formed a special friendship with Celebrimbor, who led a guild of smiths called the Gwaith-i-Mírdain. At the time Galadriel and Celeborn were the rulers of Eregion, but around 1350 Sauron "persuaded [the Gwaith-i-Mírdain] to revolt against Galadriel and Celeborn and to seize power in Eregion" (Unfinished Tales, The History of Galadriel and Celeborn). This incident shows that, even when Sauron's academic side was dominant, it was still well mixed with his drive for power. Tolkien tells us that Galadriel suspected he could not be trusted, and in a note Christopher Tolkien speculates that she guessed his true identity. And while Galadriel is around, Sauron does not seem to attempt any projects that might be too challenging to Galadriel's sensibilities. It is only when she and Celeborn are driven out of Eregion that the Gwaith-i-Mírdain begin the more radical work of creating rings of power.
For his part, Celebrimbor "was not corrupted in heart or faith, but had accepted Sauron as what he posed to be." When he discovered that Sauron was crafting a Ring that would rule the rings that he and the other Gwaith-i-Mírdain had made, he "revolted against Sauron" and, at the advice of Galadriel, sent the three elven-rings far from Eregion so they could be hidden from Sauron.
When he heard that the rings had been hidden Sauron made war against the war of Eregion. Celebrimbor fought against Sauron to keep him from entering Celebrimbor's home, but Sauron captured him, eventually torturing and killing him. Sauron found the nine rings he later gave to the Nazgûl in Celebrimbor's home, and Celebrimbor revealed the locations of the seven dwarven-rings while being tortured, but he never told where he and Galadriel had sent the three rings to. Then, "in black anger [Sauron] turned back to battle; and bearing as a banner Celebrimbor's body hung upon a pole, shot through with Orc-arrows, he turned upon the forces of Elrond."
This is a very different Sauron than the one who first enters Eregion, if the personality as I have portrayed it is genuine. (I believe it to be most likely, but the canonical texts certainly do not require that he have had those motives in mind.) Assuming he did have a bit of a revival on entering Eregion, it is plausible that Sauron would also have reacted so violently to something he considered a betrayal. He had been among the most powerful of Morgoth's lieutenants in the First Age, and among the men there probably would not have been anyone who was his equal. An elf was certainly no equal to a maia, but a descendant of Fëanor would have been masterful and intelligent. I can easily see Sauron treating him as an equal. The fact that Sauron gave him gifts and worked with the Gwaith-i-Mírdain, rather than overwhelming Eregion by force, suggests that Sauron would have interacted with Celebrimbor as an equal, a dynamic that involves a certain amount of vulnerability, and when Sauron was rejected precisely because Celebrimbor discovered who he really was, it is easy to see why Sauron would have reacted the way he did.
If Sauron's earlier, less perverted (to use Tolkien's word) character did re-emerge when he first entered Eregion, his older self reasserted itself quickly and thoroughly as his friendship with Celebrimbor fell apart:
Now Sauron's lust and pride increased, until he knew no bounds, and he determined to make himself master of all things in Middle-earth, and to destroy the Elves, and to compass, if he might, the downfall of Númenor. He brooked no freedom nor any rivalry, and he named himself Lord of the Earth. A mask he could still wear so that if he wished he might deceive the eyes of Men, seeming to them wise and fair. But he ruled rather by force and fear, [...] and he gathered again under his government all the evil things of the days of Morgoth that remained on earth or beneath it, and the Orcs were at his command and multiplied like flies.
Still, I believe this was a change from how Sauron was when first entered Eregion. The potential for rejuvenation both after Morgoth's fall and after encountering the elves of Eregion shows that Sauron was not so given over to the drive to drive to dominate others as we might at first assume. It is certainly a more genuine sharing of knowledge, a more equal partnership than he shows in the other foreign kingdom he enters into: Númenor.
Sauron drove the elves out of Eregion for a time, but his victory did not last. The elves who had been driven out allied themselves with Gil-galad's people and with the Númenóreans. After being driven out of Eregion, Sauron retreated into the east. This was around the time he fortified Barad-dûr in the reign of Tar-Calion, mentioned above. However, the Númenóreans did not leave him alone there and eventually Sauron allowed himself to be captured by Ar-Pharazôn. He "assented as one constrained, yet in his secret thought he received [the captivity] gladly" (The Silmarillion, Akallabêth).
He quickly rose through the ranks of Númenórean society so that "ere three years had passed he had become closest to the secret counsels of the King." This dynamic, though, was very different from the way he had related to Celebrimbor. With the Gwaith-i-Mírdain Sauron had taught the smiths how to do certain things. This was not just the communication of knowledge but the development of capacities, something that required practice and tutoring rather than simple transmission of information. With Pharazôn, however, the learning resembled a traditional student-teacher relationship more than it could have with Celebrimbor. Sauron had certain facts that Pharazôn wanted, and Sauron simply had to tell him what he knew.
In this way, Sauron "gainsaid all that the Valar had taught [the Númenóreans]; and he bade men think that in the world, in the east and even in the west, there lay yet many seas and many lands for their winning wherein was wealth uncounted." With Pharazôn, Sauron shared even more dangerous "knowledge." He told the King that the Valar had deceived the Númenóreans about Morgoth and that Morgoth was not actually an enemy of Ilúvatar. He instructed Pharazôn to call his former lord Melkor, and he told him that Melkor was "Lord of All, Giver of Freedom, and he shall make you stronger than [the Valar]." Sauron even tricked Pharazôn into believing there was no Ilúvatar; he claimed that the Valar had made him up so that their own pronouncements would seem unassailable.
Building on this theology, Pharazôn and Sauron set up a religion devoted to "worship of the Dark, and of Melkor the Lord thereof." As part of this worship, Sauron "caused to be built upon the hill in the midst of the city of the Númenóreans, Armenelos the golden, a great temple." Pharazôn had the White Tree of Númenor torn down, and its wood was burned on an altar in that temple. (Isildur had stolen some fruit from that tree, which was later replanted in Gondor.) From here, this "religion" devolved into a violent means to oppress the political and philosophical opponents of Sauron and Pharazôn.
Aside from the physical details (which are among the most graphic I have ever read in Tolkien), the details of how the victims were chosen is particularly heart-wrenching. They were never selected because "they would not worship Melkor, the Giver of Freedom, rather was cause sought against them that they hated the King and were his rebels, or that they plotted against their kin." But they most often were taken from the Faithful, so for their philosophical differences these men were also branded as criminals in the more common sense.
All of this was designed to make the Númenóreans fear death even more. By sacrificing people to Melkor "that he should release them from Death," Sauron ensured that their own impending death was always on the Númenóreans minds. Of course these sacrifices did not keep men from actually dying, so the followers of this new religion would feel even more powerless than they had felt beforehand. Sauron encouraged Pharazôn to build up weapons and navies, and Pharazôn – anxious about his own increasing age – did just that. He sent these new warships to Middle-earth where the Númenóreans came "no longer as bringers of gifts, nor even as rulers, but as fierce men of war," and "Pharazôn grew to the mightiest tyrant that had yet been in the world since the reign of Morgoth."
Eventually Sauron convinced Pharazôn that the key to immortality could be found in Valinor. There, Sauron said, "The Valar have possessed themselves of the land where there is no death." At last Pharazôn "hardened his heart" and decided to sail west "to wrest from them everlasting life within the Circles of the World." The Valar, fearing that the Númenóreans would spoil Valinor if they ever set foot on it, laid down their power and allowed Ilúvatar to remake the world, with horrific results. Númenor was swallowed up by the sea but only after its people were exposed to terrifying storms and earthquakes. Even Sauron was surprised by the severity of this reaction. Out of all the men of Númenor, only a portion of Elendil's household escaped.
Sauron himself was very nearly killed in this destruction. He "was not of mortal flesh," but he did lose his body and "could never again appear fair to the eyes of Men." His spirit escaped the downfall, though, and he traveled over the sea as "a black wind over the sea." At last he returned to Mordor where he fashioned for himself "an image of malice and hatred made visible" for a new body.
From this point on, Sauron's story is the story of The Lord of the Rings. Elendil's company founded the realms of Gondor and Arnor and (together with Gil-galad's armies) they made war against Sauron. Sauron was defeated (temporarily) when Isildur cut the ring from his hand, but since the Ring survived so did Sauron. Eventually Sauron was destroyed when Frodo threw the Ring into the Crack of Mount Doom during the War of the Ring. Through all of these events Tolkien doesn't tell us anything more about Sauron's character. If the maia of Aulë still existed within him, he made no further appearance.
It is easy to hate Sauron, and easier still if we reduce him to the level of an orc, a villain with neither motivation nor reason. I am not sure that Sauron deserves our love, because some of his actions (especially those regarding Númenor) are morally indefensible. Even so, Sauron was not always the character we meet in the Lord of the Rings. Understanding how his character developed gives an interesting view on Tolkien's theme of the dangers of technology and creation. Agree or disagree with that position, Sauron's story is just the kind of situation where those issues become important, and so Sauron gives us more insight into why Tolkien approached this topic the way he did.
He's also a fascinating character with a fascinating backstory in his own right. It's well worth the effort to better acquaint ourselves with him.