It's always good to tell the truth. How soon, it depends on the child's capability of understanding that babies come from their mother. Generally by the time they reach 1st grade in elementary school or (5-6 years old). But if the child asks; sooner than that. You see, when your child asks that question that means they are ready to hear the truth about their parents. It also means that they probably overheard family members or friends taking about it.
If you haven't spoken to your child about it yet, it is important that you don't let your child be around people who will openly speak about it in front of your child, assuming he/she doesn't know what they're talking about. This can be cruel because confusion will arise, then, the trauma when they hear it from you and realizing the truth can be striking.
When I grew up, a school mate of mine really believed her grandfather and grandmother were her parents. One day, a child in school told her "those are not your parents, they're your grandparents" and she became upset and shouted "they're NOT, they ARE my parents, they're my parents!!"....
She then, became separated from the group in recess and similar activities. If her grandparents had told her the truth, she could have said "I know they're my grandparents, but I love them as if they were my parents". This is only an example of situations that may arise, specially when your child goes to school.
It is important to let them know that you love them, and that you are there as if you were his/her parents. It is also best to tell them what to say when someone asks, or when a child questions their parents originality. When questioned your child should be able to say "I have adoptive parents and I love them very much. My real parents couldn't take care of me so they looked for my adoptive parents to take care of me. My adoptive parents love me as if I was their real child"