A snug fit is best, because it gives you the most control and prevents the dildo from twisting around (if you have a curved dildo for prostate stimulation you want to have it stay in place). The O-ring should be at the dildo's maximum size, or very near since rubber will stretch a bit.
In practice, though, you can have an O-ring that's up to about 1/2" in diameter bigger than the dildo, provided your dildo has a sturdy base that's wide enough. It will flop around more and rotate during use, but it will work.