There are numerous products on the market that come in the form of sprays, liquids, and granules. A popular product is called “Liquid Fence,” for example. Most products are non-toxic and biodegradable. Some have offensive odors to both dogs and people, while others have odors only offensive to dogs. You can also sprinkle chili powder or cayenne pepper around the edges of your yard. The catch is keeping up with consistent applications of whatever you are applying, such as after a rain.
There are “sonic” solutions that may work to keep dogs out of your yard. These machines may work, but they will also keep other critters such as birds out of your yard too.
Lastly, you can also go whole hog and put a fence around your yard. You will still need to regularly check the fence perimeter, as determined dogs will dig right under them.