Starting as young as a few weeks is okay.
Socialization is important at this stage because a pup learns a lot of things from his/her environment. Training your dog to be around other dogs and people will help build his/her personality when he/she grows up.
Basic training is okay for a young pup, and here’s an excerpt from an article:
…socialization in the first 12 weeks of a dog’s life is critical. There’s a lot of validity to the expression, “It’s easier to prevent than to correct.” At age 6 months most dogs have entered what I fondly refer to as the “punk” stage. They go from puppy to punk to young adult. Could you imagine not teaching your child any manners until the kid was a teen? It would be like living with a walking and talking piece of dirt.
If I can, I start training as soon as a dog is weaned.
You can read the full article here.