It mostly depends on the finished fabric you're going for. A cupcake, I imagine, would require a dense fabric to give it shape so you'd use a smaller needle for a tighter stitch.
Lace often uses a very large needle compared to the thickness of the yarn to give a loose, drapey fabric.
The pattern gauge is what you want to aim for in order for the finished product to turn out to be the proper size.
"Trust the pattern!"
Time flies like an arrow, but fruit flies like a banana.
Hop aboard while we follow the cloud-covered van of knitting harmony, man!! Woooo!! --Hedgehog
IngridKH on Ravelry