It's an image from the theatre or cinema. The cast of a production are the actors who play the different characters. The stereotypical characters in any story are the heroes and the villains. The producer decides which actors are going to play which parts, and 'casts' them accordingly. The producer casts some people as heroes and some as villains.
In this sentence, it is you, the reader or observer, who can decide whether these people are the 'goodies' or the 'baddies' in the story.