To keep rabbits from digging under the fence, you should bury a portion of the fence 6 inches under ground with a section extending outward 6 to 12 inches. The upright portion of the fence needs to extend at least 18 inches aboveground. And the mesh in the fence should be no larger than 1 inch in diameter.
Squirrels, of course, can climb over a fence, so they are more difficult to control. You might be able to thwart them by covering your plantings with floating row cover anchored on the edges until plants become established.
There are some organic rabbit and squirrel repellents available, such as garlic, hot pepper, and cinnamon.