It means that you give up on an argument. It refers to a lawyer’s argument or case in court. When the case is over, that means a decision has been reached. So the lawyer can “rest his case.”
“I rest my case” can be used ironically and also meaningfully.
Meaningful example: You thought whales were dolphins, so you try to argue why you think so. Your friend proves you wrong by showing you scientific facts as to how these mammals are different species. You realize you’re wrong so you say, “I rest my case.”
Ironic example: You believe that your brother is very smart. Your friends don’t believe you. In the middle of discussing whether or not he is smart, your mom calls your brother, “Son, the rice cooker is broken!” Your brother comes to the kitchen and easily fixes the rice cooker. You look at your friends and say “I rest my case” because your brother just proved your argument true.