the length of the needle (16", 29" and so on) is how long it is, measured from tip to tip. So, if you want to knit something that is 20" around (smallish hat size), you would use the 16".
Now, if you are using Magic loop, you only need one semi-long needle, like others said, and this will be able to make a hat of any circumference. Same goes for two circulars, only difference is you need two needles instead of the one.
Now, I really don't know how big a kids' head would be, but if the hat is going to be smaller than 16 inches around, you will either need to knit the hat on DPNs, magic loop or two circular needles.
As for how much to cast on, this entirely depends on your needle size, the yarn you are using, and how tightly you are knitting. The way I go about figuring out how many to cast on, is to knit a little swatch (say, cast on what looks like 4 or so inches, in width, knit in stockinette until it is a few inches in length) and measure across the width how many stitches you get per inch (SPI) (it is more accurate to measure this over two or more inches, and then divide to get per inch, but for hats, this is not crucial).
Once you figure out how many SPI you are getting, figure out how many inches around you hat is going to be (aka, measure the persons head at the widest point). Then all you have to do is multiply the SPI by this measurement. That is how many you need to cast on
And one final thing. If you are knitting a really stretchy hat (like, entirely in ribbing), then you will want you Final Hat Measurement to be a few less than the persons actual head.
So say you are getting five stitches per inch, and the head your knitting for is 23 inches around. Rather than casting on 115 stitches (5 x 23), I would cast on between 100-110, depending on the stretch factor.
Hope this helps (and I hope I didn't ramble on too much either)!