"Serve him right" is used to inform the audience that the character did something that he/she shouldn't have done and that he/she deserve it. In a few words, people should not meddle in things they do not know.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.