You use "leave it with me" if you are taking possession of something. If a package arrives at your house for your parent, you can tell the deliveryman "You can leave it with me" and he will give it to you. If you have to hand in your homework but the teacher isn't there, the assistant can say "Leave it with me" and she will take your homework.
You use "leave it to me" if you are taking on a new responsibility. If your friends are planning a party and they ask who will bring a cake, you can say "leave it to me" if you will bring it. If your roommate is too busy to wash the dishes, you can say "leave it to me" if you will wash them.
Solzhen is right (and gives some good examples), but I would add that, at least in British English, "leave it with me" can also mean virtually the same as "leave it to me".
"I can't get my website working properly."
"Leave it with me. I'll sort it out."
(The meaning is "leave the problem or the job with me".)
I have no idea which is more common. Sorry.
"We are not wholly bad or good, who live our lives under Milk Wood :-| " — Dylan Thomas, Under Milk Wood