Don John wants to hurt his brother’s reputation by causing a scandal, so he interferes with Claudio and Hero’s wedding.
Don John does not like his brother. He is illegitimate, and he resents everything about his brother’s status and station. Therefore, even though Don John comes to Don Pedro’s estate, he is not there to party. He is there to cause trouble.
I had rather be a canker in a hedge than a rose in
his grace, and it better fits my blood to be
disdained of all than to fashion a carriage to rob
love from any: in this, though I cannot be said to
be a flattering honest man, it must not be denied
but I am a plain-dealing villain. (Act 1, Scene 3)
Don Pedro is a sort of sponsor for Hero and Claudio, and their wedding is imminent. Don John sees this as the perfect opportunity to embarrass his brother. He plots to ruin the wedding by making Claudio think that his betrothed has been untrue.
Any bar, any cross, any impediment will be
medicinable to me: I am sick in displeasure to him,
and whatsoever comes athwart his affection ranges
evenly with mine. How canst thou cross this marriage? (Act 2, Scene 2)
Claudio does not seem to have much strength of character. He accepts what he has been told as real, even though the only proof he has that Hero cheated on him was a silhouette at a window. That is enough for him. Without asking her about it, he condemns her in front of everyone on their wedding day.
Eventually, the truth does come out (despite the fact that Dogberry is on the case), and Don John is condemned. Hero and Claudio end up together. While this seems like a happy ending, in some ways it is not. Hero has no choice but to go back to the man who rejected her, because her reputation will always be in question. Don John’s legacy will haunt them.