If the holes in your yard are indeed from rodents, one option is to install a rodent fence. This type of fencing can help to keep rodents out of areas you want protected, like gardens.
Regardless of the type of rodents causing rodent holes in yard and garden areas, homeowners should seek to take preventive pest control steps. Make the home and yard less attractive and less accessible for rodents by removing easy access to safe shelter, food, and water. These steps will help keep the rodent population under control in the yard and help to discourage them from trying to enter the house.