A good rule of thumb is to wait a couple weeks after visible signs of fermentation begins. You'll see it working and then subside as the foam and yeast fall back into the beer. This can be as quick as a day on up to weeks. But in normal strength beers the attenuative phase of the fermentation only takes about three days. However, instead of transferring to secondary one can just leave the beer in primary a little longer to allow the yeast to drop. Plus, the beer conditions in that time period more effectively than if it were off the yeast. Best not to leave the beer on the yeast too long though. It's a live product.
Not a hard and fast rule or anything.
Play with it a little... If you plan to be making much beer this fermentation thing is a key factor.