Children under the age of 9 need shorter scarves because they themselves are shorter. Many people swear by the rule that scarves should be as long as the person is tall, but a general guideline for younger children is 36 inches long. This accounts for a child who is roughly 3 feet tall, and will keep it from being so long a child could trip over it.
Older children need to have a longer scarf to allow for their extra height and size. For them, 48 inches is a good guide to go by.
If you are making a scarf for a specific person, it would be best to measure them before you finish making the scarf. If you are able, hold the scarf up to them as it is being knitted to determine where the perfect look is. A good width for a scarf for children is between 5 and 7 inches. You don't want it to bunch up too much around their small necks.