For performance dogs we like to wait until 18 months on average. The point is to wait for them to really be done growing. Removing hormones before that point can cause bones and muscle to grow differently than they would have otherwise. Dogs fixed early tend to be taller and less filled out than they would have been otherwise. However if it is a non - working pet dog than the difference is not likely to matter too much. And for males, if you are seeing unwanted behavior you will have to weigh your options. If you are seeing aggression, obsessive marking, or wandering and you don't feel that you can overcome these behaviors with training then you may want to fix your dog earlier than the 18 month mark. Also, if you have both an unfixed male and female and you don't intend to breed then do yourself a favor and fix at least one of them... it can be incredibly difficult to keep them separated enough during the females season to prevent an accidental breeding.
If it is a large breed or a breed prone to hip dysplasia I would wait for the 18 month mark at minimum even if the dog wasn't in a sport. I've been training and competing in dog sports for 10 years and I think it is actually pretty amazing that just from the look of a dog you can often guess if they were fixed early but that is just an observation, for the real data...
This is a good paper that sites several studies done that found increased incidents of CCL rupture, hip dysplasia, and patellar luxation in dogs that were fixed early. These injuries seem to correlate with the findings of longer tibia, radius and ulna which are likely caused by the delayed closure of growth plates. The lack of hormones slows the closure and allows the bones to grow longer than they would have otherwise. This results in dogs that are taller and don't have as deep of chest cavities as they would have otherwise.
It looks like the bones may be less dense than they would have otherwise as well but I have not yet found a scientific study to back that up.
I think it is really encouraging that we are now seeing alternatives to a full spay or neuter that keep some or all of the hormones without the risk of accidental breeding. Some of the alternatives are ovarian or uterine sparing spays and for the boys there is now a product called Zeuterin. If these catch on it's possible that we will see the rate of these injuries decrease significantly.