There is no set age as to when a pig should be adopted. Many people adopt younger pigs simply because they get to spend the most amount of time with their pigs. But to be honest, there shouldn't be too much difference in your pig's behaviour other than the fact that young pigs tend to be more hyper and active, and older pigs will begin to settle down, many becomig comfortable "cuddle bugs" (as I like to call them, haha).
The only real way to tell aproximately how old a pig is is by thier weight/size, but after about 8 months (as I recently learned ) they are pretty much full grown, so it could be anyone's guess. A full grown pig is about 8-12 inches in length and weighs about 2-3 lbs. Significantly less would mean a very young pigger!
You mentioned "buying" a pig--please try your hardest to adopt a pig from a shelter or rehome a pig whose owners are unable to care for them anymore. There are too many homeless pigs and buying from a petstore or breeder only perpetuates this cycle and leaves other cavies in the shelters to die. Try www.petfinder.com or (broken link removed) to find a pig in your area.