I think that there are situations where the child may have a valid need to ask such questions of his or her parents. For example: let’s say the child is now 15 years old, and knows his/her parents just celebrated their 14th (or less) wedding anniversary. In that situation, it would be obvious that that child was born before the parents were married. So it would be natural for the child to ask why they must be held to a standard that his/her parents obviously didn’t observe themselves. In that case I think it’s entirely appropriate for a mother to discuss this with her children.
Like Em said, it’s acceptable and understandable for a parent to admit to mistakes and try to help keep their child from making similar mistakes.
To the OP: the wonderful thing about being human is that we are able to learn from our mistakes. Just make sure that if yours is a situation like the one I described above, that you make it clear that the child is not the mistake–premarital sex is the mistake. God can sometimes use our mistakes and give us something wonderful from them.