The selection of the yarn weights has much to do with your intended knitting projects.
If you are wanting a chunky sweater, then it stands to reason that you would choose a heavier weight of yarn. Equally, looking for something more elegant and lacier, then you would likely choose a lighter weight of yarn.
The below table gives you the weights and needle sizes for different yarns and the “suggested” usages. Of course, rules are made to be broken so feel free to experiment.