As a rule of thumb, the pilot hole for a lag screw should be approximately 75% of the total diameter of the screw you are using. For a 5/16-in. lag bolt, that works out to be about 7/32 in.
A simpler approach that I’ve always used is just choosing a drill bit that is the same diameter as the solid part of the bolt minus the threads.
The threads are what bite into the wood to hold the screw in place. Drill too large of a pilot hole and the bolt will not hold.
Drill too small of a pilot hole and the wood splits.
When in doubt, err on the smaller side. You always can make the hole slightly larger.