Look at appendix B in ASME Y14.5M-1994 or equivalent.
It varies for floating (nut & bolt) or fixed (threaded hole pattern in part & screws) situations.
thread1103-221602 4 Sep 08 3:26 even has some worked examples.
Simplistically, you calculate the clearance. For a fixed fastener this has to be split between the 2 parts. For a floating fastener both parts get this value.
E.G.
#4 (.112) screws floating in .140 minimum dia hole:
.140-.112 = .028 'clearance'. Now you could divide this equally as .014 dia pos on both. Or, you could take into account that threaded holes are 'harder' to make and don't benefit much from MMC (arguably in some gageing situations), while the clearance hole is easy to make and benefits from MMC. In this case you might assign more to the threaded hole, perhaps .016 with .012 to the clearance or similar.
#4 (.112) screws floating in .140 minimum dia hole:
.140-.112 = .028 'clearance'. The holes in both parts are assigned .028 dia true pos tolerance.
The above is a short explanation of how to Analise it.
To design it really well you need to know standard tool sizes, not just drills but also ideally Counterbore tools if applicable (there are tables in machineries - just be aware that the sizes for small fasteners in 'close clearance' almost require match drilling). Also some appreciation of the process capability for making the holes and probably some other stuff that doesn't pop into my head right now, such as maybe inspection.
There are usefull tips too like, don't try and use threaded holes for position alignment or parts. Also there are tricks for handling countersunk fixed fastener situations which I've posted before but would probably confuse you right now.
Important thing is that while function is the primary driver, don't' forget manufacturing and inspection.
(I've rushed this a little, so sorry for any errors.)
Posting guidelines faq731-376 (probably not aimed specifically at you)
What is Engineering anyway: faq1088-1484