It's a grub of some kind. The pic is kind of dark, so all I can tell you about what "kind" it might be is that if it's a creamy white color with a dark rear end, then it isn't anything good. I would kill them. The critters that develop from such grubs are never ones I consider "garden friends".
"Isn't it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?" - Douglas Adams
I get grubs like that in my compost pile every once in awhile. For me it is usually one or two, I have never seen a bunch of them. Most likely they are Japanese beetle larvae. I just pull them out of the compost and throw them on the concrete patio, where they can't burrow in and become bird food.