I tend to use old knitting patterns. If you are lucky, sometimes you can find a note somewhere in the pattern book as to what weight which yarn is (or that it's equivalent in weight to some yarn for which the weight IS known.) If not, I usually go by needle size for a first guess (see below) and then knit a swatch with the given needle size (or if you always have to adjust up or down one, use that size) and compare gauge. You can use pretty much any yarn of a known gauge for this swatch; however, if the pattern is using a non-standard yarn weight/needle pairing, it can be easier to determine this if you use a yarn with a similar fibre composition. Pattern stitches, particularly lace or complicated cables, can complicate things. Laces are sometimes knit on larger needles relative to yarn weight and cables smaller ones. If a gauge is given for the pattern stitch, use that for your swatch. If the gauge isn't given, you probably want to do a swatch of that as well to make sure it looks right. You don't need to get your gauge perfect for these swatches - you'll do that with the actual yarn. You just want to get close enough that you are fairly secure that you know what weight yarn you want.
Needle Size -> First Guess for Yarn Weight
11 up -> some type of chunky or heavyweight yarn
10 -> worsted weight or chunky check picture
8-9 -> worsted weight
7 -> worsted or sport weight; pre-1960 probably sport weight, post-2000 probably worsted weight
5-6 -> probably sport weight
4 -> sport or fingering/baby weight;
2-3 -> fingering or baby weight yarn (sometimes also called sock weight)
1 or smaller -> probably some type of crochet cotton
Hope that helps,
Julie