I wait for the first killing freeze after the foal is weaned, if he's not an early foal. For an early foal, if it's still not fly season, I'll geld them even before they're weaned as long as they're descended. I have a colt right now that I did at 2 1/2 months. He's never had a studdy thought and never will. That's only for a colt that is obviously not a stallion candidate. For ones that might be good stallion candidates, I like to wait until they are 2 or 3 and see their disposition as it develops. If it's good I'll wait, if not, I'll geld quickly.
When you decide to geld, look up the Best Days in the almanac and do it during that time. It seems to keep problems minimal.