It means to not give someone the punishment they deserve from you or another.
A related phrase is "let somebody off the hook." The analogy there is to a fisherman, who has caught a fish, but instead of eating it, he lets it back into the water.
Letting someone off the hook, then, is like that fisherman. He has some power to punish or harm a person as a result of their actions, but he can "let them off the hook" and pretend it never happened.