A nice formula is: SQRT(2.44 x .00053 x focal length in mm)

For instance, the optimum pinhole size for (say ...) 60mm focal length would be:
SQRT(2.44 x .00053 x 60) ~= .2786mm ~= 280um

Note: .00053 is the median wavelength (in mm) of green light.

Hope this helps,
Loris.