What is the difference between good and evil characters in fantasy novels?
There is a superficial difference which seems universal to the genre, and a fundamental difference which is seen only in the best of the genre.
The superficial difference is that good characters are kind, honest and altruistic, while bad characters are cruel, lying and selfish.
But the main superficial difference is kindness versus cruelty - the scenes which depict the evilness of the evil characters are typically those where they take pleasure in torment and torture.
This is seen in the best of the genre as well as the mainstream - Tolkien's orcs are cruel and love to torture, Rowling's Death Eaters love to torture Muggles and Muggle-lovers.
This can be seen as a hedonic morality, evil characters make others miserable: Vote for the goodies and have a better life.
Cruelty is never good but it is possible to imagine a fantasy novel in which the goodies were violent and the baddies are pacifists. When the regime is evil and in control, and the only escape from oppression is by force, then evil may be pacifist.
In Lord of the Rings Wormtongue takes a pacifist line when it comes to fighting Saruman, and he tries to protray Eomer as a blood-thirsty troublemaker who is the cause of provoking Saruman's aggression against Rohan.
In the Deathly Hallows where Voldemort controls in Ministary of Magic, official propaganda presents Harry and his supporters as the cause of all repressions, and provoking the necessity for the Snatcher squads. If only Harry would surrender, or would be handed-in to the authorities - then all would be peaceful...
But the fundamental nature of evil in both Tolkien and Rowling is that evil desires to usurp God and itself be worshipped.
This meaning is deeply buried, but it is there.
The reality of Tolkien's universe is that The One is supreme; but Morgoth's prideful desire is to be worshipped in his place. Sauron is Morgoth's chief 'priest', and when he corrupts Numenor Sauron reinstates the worship of Morgoth. Presumably this would be Sauron's aim if he ruled Middle Earth - or alternatively to set himself up for worship (there are indications in the History of Middle Earth that Sauron pretended to be Morgoth at one point).
It is this displacement of God which is Morgoth/ Sauron's fundamental evil - that they falsely set themselves up as the supreme object of worship.
And in Harry Potter something similar applies to Voldemort.
While Dumbledore and Harry implicitly serve some higher but unnamed Good (which is, in fact, God - as is suggested by the Harry-Dumbledore discussions of the King's Cross - Limbo chapter, and its depiction of the state of Voldemort's soul) - but Voldemort wants to be worshipped as supreme.
This is perhaps why Voldemort/ Tom Riddle will not allow anyone to speak his name, will not allow his name to be 'taken in vain' - this is characteristic of a jealous god.
So, in the best fantasy, evil is ultimately that which would falsely usurp God as that which ought to be worshipped: evil is that which sets itself up to replace the true God.
The goodies are those who oppose this - and the characters are defined as good or evil not so much by their conduct as by which side they choose: real God or usurper; truth or falsehood (although conduct is also affected by the choice of sides).
Evil is an objective wrong because it is a denial of the Truth of the universe, the evil usurper is not - in fact - God: God is God - the only legitimate object of worship.
In fantasy novels the attempt to enforce worship of evil leads to the superficial features of evil; because to worship evil and deny God is inherently false; it is distorting, unnatural.
The desire to overturn the organizing principle of the world is indicative of the primacy of pride and will - and to re-order the world requires immense power to reshape everything according to the will of the usurper - the more unnatural the desired state, the greater the power required to create it.
Hence evil characters seek power over the world. The unnatural deployment of power then leads on to the 'superficial' side effects that characterize the evil characters in fantasy: destruction of beauty, denial of Natural Law, deceitfulness, and that cruelty that delights in bending the will of others to conformity with the will-full fantasy of the evil villain.