Xerxes is an interesting character from the history of Persia. Xerxes ruled Persia as king from 486 BCE to 465 BCE, when he was assassinated.
Some would say that the fact he was assassinated at all is enough to say that he was a villain, but it is all really a matter of perspective; if you are a Persian descendant, than you would probably say that he was a great king, but if you are a Greek descendant, than your opinion would probably be less positive...
Xerxes did many great things for Persia, but also some horrible things to their enemies.
For example, when Xerxes destroyed Athens, he decided that just destroying Athens was not enough, and he wanted to kill the fleeing residents as well. This created the Battle of Salamis, which Persia lost.
Those Persians who had come up first betook themselves to the gates, which they opened, and slew the suppliants; and when they had laid all the Athenians low, they plundered the temple and burnt the whole of the acropolis.
This over-inflated ego of how much he could do caused him to ignore his advisers, and go ahead anyway. This resulted in an overall failure for Persia, at least from a Greek perspective, as the Persians saw it as regrouping for a later attack that never happened.
This makes even less sense when you consider that Xerxes was executed by his own people, even after he was given another 15 years of reigning over Persia than most kings get.
All of this contradicting information really makes this a difficult question to answer, was Xerxes a hero, or a villain? He did heroic things that helped Persia expand and destroy their enemies, but a victory for Persia is a loss for their enemies. This question is purely a question that tests bias. If I was a direct Persian descendant, than I would positive towards him, but if I was a direct Greek descendant, than I would be negative towards him. There is no correct answer that is not biased.
Perhaps finding if Xerxes was evil would be a better question, considering his thirst for blood at the Battle of Salamis continuing even after he destroyed Athens.
It is hard to say if a person is truly evil, or just a product of their environment, as such, the affect of Darius on Xerxes muddied the waters surrounding this question.
Darius was recently defeated at Marathon, when he died, and the Egyptian Revolt had recently started. This threatened Persia's continued existence, so Xerxes was forced to act so he would not be assassinated, or see Persia fall.
In this Battle of Marathon there died, of the barbarians, about six thousand four hundred men, and, of the Athenians, one hundred and ninety-two. Those were the numbers of the fallen on both sides. . . .
This may have caused Xerxes to make some decisions that he would not have normally have made, and could have affected his thinking and decision-making. This means that there is no real way to tell if Xerxes was truly evil, but if he was, than wouldn't he have been murdered earlier?
Persepolis was a great city, the capital of Persia in fact!
It seems that Xerxes agreed with this sentiment as he created many great building projects, such as building a new palace, beginning the completion of the Gate of All Nations, Apada, the Tachara at Persepolis, Harem, etc. [JH23]
These huge building projects were very expensive though, and considerably drained the empire's treasury, which did not bode well considering the effect that his recent campaigns have caused. This may have been a reason why he was assassinated, but no-one really knows.
These building projects did a lot for Persia, for example the Gate of All Nations emphasised their strength, and helped with making the kings feel powerless, and more likely to pay their taxes.
But, is making your own people feel powerless a good thing in this context? Persia existing was a good thing in itself, as it helped slow down Rome from their attempts to take over everything but is forcing people to pay taxes, and spending those taxes on something that exists almost entirely to force people to pay more taxes, really a good thing? This question is borderline unanswerable, so I will leave this as an exercise for the reader.
To take another perspective, A. Pagden wrote in his book "Worlds at War" (2008):
Had Xerxes succeeded, had the Persians overrun all of mainland Greece, [...], had Greek democracy been snuffed out, there would have been no Greek theatre, no Greek science, no Plato, no Aristotle, no Sophocles, no Aeschylus. The incredible burst of creative energy that took place during the fifth and fourth centuries B . C . E . and that laid the foundation for all of later Western civilization would never have happened.
This is disputed though, and seen as overly dramatic and harsh. Even if this was correct, it would only mean that our western culture would have come from Persia instead, I doubt that this would cause a huge lack of progress. You cannot have zero culture at all, you can only change which one you have.
It also talks about democracy no longer existing due to Persia taking over. This is more possible than the other notes, but also unlikely in my opinion. Good ideas come back, and our analysis of the past would have uncovered this government structure, and brought it back.
The mentions of no Plato, Aristotle, etc, are also overreactions. Sure, we would not have those, but we would have Persian equivalents.
Xerxes inscribed some text at Van into this stone, it is believed to say the following:
A great god is Ahuramazda, the greatest of the gods, who created this earth, who created yonder sky, who created man, created happiness for man, who made Xerxes king, one king of many, one lord of many. I [am] Xerxes, the great king, king of kings, king of all kinds of people, king on this earth far and wide, the son of Darius the king, the Achaemenid. Xerxes the great king proclaims: King Darius, my father, by the favor of Ahuramazda, made much that is good, and this niche he ordered to be cut; [...] then I ordered that this inscription be written. Me may Ahuramazda protect, together with the gods, and my kingdom and what I have done.
This shows how Xerxes tried to show himself to the people of Persia. It shows that he prioritised Zoroastrianism over other religions, which goes against the main rule of Persia being religion-tolerant. This can be seen as Ahuramazda, the supreme god in Zoroastrianism, is specifically mentioned in the text.
Ahuramazda may have also been mentioned to try and draw a connection between Xerxes and Ahuramazda, as this would make him appear much greater than he really was.
In conclusion, I believe that the question of if Xerxes was really a hero or a villain, is entirely based in opinion.
There are good arguments either way, like how he created many great building projects that helped advance the Persian Empire, but also how he decided to pointlessly kill all of the citizens of a city-state he had already destroyed in the Battle of Marathon.
So, was Xerxes a hero? Probably not. He was after blood pointlessly and made his people feel powerless pointlessly but, was he a villain? Also probably not. He did some great things for Persia, like continuing on with major public works and building projects, and starting new ones.
All the sources for this are incredibly biased as well, the few persian recounts we have are, naturally, biased towards Persia, but the Greek recounts are also biased, naturally towards Greece.