I wouldn't just because if they are from your yard they may be covered in pesticides or be full of parasites. Also earthworms are usually way to big for leopard geckos to eat.
If you do want to get treats for your leopard gecko, wax worms and butter worms are good. Don't give them too many though. You can get these worms from pet stores usually.
I had heard they could, so I tried some very small ones, but they stretched out when my leo tried to eat them, so she spit them back out and didn't bother trying again.
I buy them from the store for my turtles. So they are not from the back yard. I was also planning on cutting them up before giving them to my lizards so they would not be too big.
I've given my leos small nightcrawler pieces that my Pacman didn't eat. They seemed to enjoy them. Once they got used to the texture. I bought them from my local bait store.