There are three major reasons a dog will dig holes.
First he might have a bone he wants to bury. His ancestors may have dug a hole and buried part of the kill to keep it safe from poachers. Over time this could have turned out to be instinctive. Your dog burying a bone inside the backyard could be a result of that instinct.
Second a dog will probably dig a hole to get out of the heat during the summer time. When you see them laying in the hole they dug within your back yard, their mouth hanging open, tongue hanging out, it looks like they are pretty pleased with themselves.
Probably that is it but most likely they're just sweating. Dogs do not have sweat glands like us. They cool off by breathing open mouthed.
Third, is because your dog loves digging holes for fun. While I was a kid my dogs dug great holes and I sometimes helped.
When the rain followed the days we dug you could float your boat in the puddles if Dad hadn't filled them in first. Digging can definitely be a lot of fun.
Now if you do not dig digging and require your dog to stop as well you can try barking at your dog. It may work but try to remember the language barrier.
When My Dad would say "I told you not to dig inside the back yard" I used to say "Where should we dig?"
If your dog digs in front of you, just telling him no, may solve the problem. Just keep in mind he is probably asking "no what?" You may need to explain.
Many holes are not dug up right in front of you. They get that you don't dig digging and don't like them to dig either. What they don't get is "why".
You ought to give a reason by putting a stake within the middle of the hole and tie them to it. The message is "if you dig a hole in the back yard I'm going to drive a stake inside it and tie you to that stake" Tie him up and show him your teeth. That's dog talk for "stay there and be quiet."
That will stop me. Your dog wont like either.
Be sure you provide a different form of entertainment. Don't put them out in the heat of the day and keep them entertained, well exercised and well watered.