Either would do--it would depend upon the animal's temperament. Mellow is a must, and I feel an adult is better, because they have had time to be trained (in the case of dogs) not to jump up and lick faces and the like, which could send a small child sprawling, or unintentionally scratch them, since dogs' claws are not retractable like a cats'.
When it comes to cats, a mellow adult cat is a better choice because they are not so tiny and delicate as a kitten, and less likely to be accidentally "hugged to death" by a toddler who doesn't understand how to be very gentle. Besides, a cat is well able to jump up to a surface out of reach of the child when kitty has "had enough."
In either case, constant parental supervision is a must! If this is not available for any reason, then wait until the child is older to get a pet.