George Lucas Originally Rejected Anakin's Sith Eyes In Star Wars: Revenge Of The Sith
Say what you will of "Star Wars," but you can't deny the franchise is great with thematically-consistent visual choices. When a Force user is meant to be bad, they've got a red lightsaber and they're dressed up in scary dark clothing. When the character's meant to be good, they've got a blue/green lightsaber and they're wearing friendly light clothing (with exceptions like Luke Skywalker at the start of "Return of the Jedi"). It's perhaps a little too simple, but it was a great idea on creator George Lucas's part to come up with a type of futuristic sword that straight-up tells you what sort of person its owner is. Talk about taking visual shorthand to the next level.
Outside of clothing and choice of weapon, "Star Wars" is also quick to use appearances to indicate morality. The morally righteous Leia is conventionally attractive, whereas the evil Palpatine has yellow eyes and wrinkly skin. There are plenty of exceptions to the rule of course — see Yoda or Admiral Ackbar — but generally speaking, a character with reptilian facial features is probably not gonna end up on the side of the light.
In episode 3, "Revenge of the Sith," the visual shorthand around the Sith also extends to Anakin's eyes, which switch over from blue to a snake-like yellow once the character has been fully seduced by the dark side. It's the perfect indication to the audience that Anakin's past the point of no return; they say the eyes are the windows to the soul, and now Anakin's eyes have been tinted to an unnatural, threatening color. Despite all this, Lucas wasn't entirely sold on the idea when Hayden Christensen, who played the young adult Anakin, first brought it up.
No full explanation given
When Christensen raised the idea behind the scenes, arguing that it served the necessary purpose of signaling Anakin's character change to the audience, it took Lucas a few days to come around. As Christensen explained to Empire Magazine:
"George was initially against the idea when I brought it up. I loved the visual of Sith eyes and thought it could make sense: Darth Maul had them and Sidious has them. George responded saying that Count Dooku didn't, and I thought that was the end of that."
The logic seemed to be that the more human-looking the Sith character was, the less fitting those evil eyes were. Darth Maul could have those creepy eyes because he wasn't human to begin with, while General Grievous could have those unsettling yellow eyes because he was already a robot. But how would one explain how Palpatine has yellow eyes in the original trilogy, but blue eyes in the prequels? The logical explanation would be that eye color can be altered by the dark side and that the only reason Palpatine had blue eyes in the prequels was because he was disguising them. Palpatine actor Ian McDiarmid has even argued that the character's appearance for much of the prequels was basically a mask, and it seems his eyes were no different.
"A few days later [Lucas] came back to me and said he thought about it some more and now liked the idea of Sith eyes," Christensen continued, "but not for that scene." The scene they were discussing was the one where Anakin chops off Mace Windu's arm; instead, Anakin's eye color change was moved over to the sequence where he murders the Separatists hiding on Mustafar.
Why not the Windu scene?
Most fans' understanding of Anakin's yellow eyes in "Revenge of the Sith" is that it's used to express Anakin's certainty in the dark path he's following. That's why it's only when he's killing those Separatists on Mustafar that he's fully embraced his new Sith Lord persona. Anakin's always disliked them, after all, so this scene was him finally getting to enjoy the benefits of reckless, angry violence.
Meanwhile, when Anakin kills Mace Windu, he's still not sure about what he's doing, so his eyes stay blue. Even when he kills the younglings, his eyes stay blue because he's not doing this out of hate but out of obligation. He's still at a crossroads during these scenes, the movie argues; he still has a chance to back out, and that makes the yellow eyes not yet appropriate. As Christensen explained:
"I think [it] was because it would have misinformed things. Anakin's fall to the dark side isn't just about good and evil and ideological views; it's also about timing and circumstance."
So, why doesn't Count Dooku have Sith eyes again? And why doesn't Kylo Ren have them in the sequels, for that matter? There are a bunch of potential explanations: perhaps it was because Dooku was remarkably calm and collected despite his evil ways, or that Kylo was arguably never really evil so much as just an angry kid lashing out. But if you're looking for any clear, consistent rule, prepare to be disappointed — there is no canon explanation given so far. But despite any questions Anakin's new eyes might raise, it's hard to argue that they looked spooky and they got the main message across. Anakin was gone now, the transition told us. From this point on, we were watching Darth Vader.