From the day you get the idea. Though in earlier stages I control who I share it with--ie. it less likely I'll share it with someone who is desperate to do a start-up. I will share it with a friend at uni to pick his thoughts.
Actually these people are great at practicing your pitch. Most investors and folks in real life you pitch to won't be THAT different from the pessimists you meet. And rightly so.
That said, negative nancies over someone who takes my idea and replies back passionately with the apparent problems with the idea and how to fix it--that's cofounder material.
oh, good point! i just meant, if you are on the fence about whether or not to do it... do not share the idea with someone that has a 100% chance of shooting you down at a critical stage.
startup lore is riddle with ideas that were ridiculed by people who couldn't see the vision early enough. (hotmail, for one)
Lets say you release a working prototype in 3 months. If its a great idea and you don't have all the features implemented yet you might start seeing clones of your idea.
If you wait too long and someone is working on a similar idea, you might lose early customers.
I usually comment on the idea as soon as I get it, but for the prototype, I have to have something quite functional, with at least one feature that really impress or shows the point clearly.