Also, try looking at other works and see how they approached tricky topics. Look at both good and bad examples. Ask yourself why it worked/didn't work here. Analysis it as you watch/read it.
As an example, look at the character Uther Pendragon from the series,
BBC Merlin. He is highly against sorcery in the story (which the main character, Merlin secretly uses to save people, including
Uther's own son) and has made sorcery punishable by death in his kingdom. He basically wants to wipe out all sorcerers and people who were born with the ability to use magic. He has killed a lot of people. The writers could have easily just had Uther be presented as simply an evil, flat villain. We are, after all, meant to be on the sorcerers' side because the main character, Merlin, is a warlock. But instead, the writer's give Uther a lot of personality, and make him quite likeable.
They make him a person. Uther Pendragon is shown to be very protective of his family, as well as his kingdom, and believes that he is protecting them by fighting sorcerers. It is also revealed that there is a personal reason why he hates and distrusts magic users:
His wife was killed through magic
. Uther also gets quite a lot of funny lines throughout the series. You even feel sorry for him whenever he thinks his ward/son is in mortal danger, and when
he eventually dies while protecting his son from an assassin
. It also helps that throughout the series, the majority of the villains Merlin has to fight are
vengeful sorcerers trying to kill Uther and his son, Arthur (who really has nothing to do with Uther's actions except for the fact that they're related), which almost justifies Uther's distrust of magic-users.
Also, to prevent your writing from sounding too preachy, if you present an argument (ie, "X" is bad because of "A", "B", and "C"), always at some point present a counter-argument (ie, "X" is
good because of "D", "E", and "F"). This can be presented through characters talking to each other, or negative/positive events that happen due to the character's choices.