There are two different approaches to threadcutting in timber. Particularly for "smaller" threads - say, up to 1" diameter - the easiest and most accurate method is to use a thread box and tap. These products are similar to the traditional engineer's tap and die, excepting that a thread box has only a single cutting edge.
For larger projects such as box lids, the preferred approach is to cut the threads using a thread "chaser ", of which both internal and external forms are produced - for obvious reasons. Arm-rests, sizing gauges and thread recess cutters are also produced to assist in the use of these tools. The proper manipulation of these tools is a test of skill and there are many articles by, in particular, Bill Jones on the subject, mainly taken from the pages of Woodturning magazine, though now also available in book form.
Finally we have the Beall Wood Threader system which enables perfect threads to be cut quickly, easily and accurately using only a router - no lathe required.