When he or she is old enough to tell you about their orientation. Until they come to their own understanding of sexuality, you can't 'tell' anything based upon their behaviours.
Sexuality and attraction starts at different ages for all children so it's important, as a parent, to send very clear messages about sex to your child from the beginning. In North American society heterosexuality is assumed to be a default for all children, until they express specific feelings otherwise. This default and assumption of the heterosexual norm can leave children who don't identify with it feeling isolated, alone and abnormal. Leaving communication channels open and telling your son or daughter that you accept who they are, whoever they are, will help him or her develop a healthy sexuality and a strong sense of self.