The most important factors are not necessarily age, but rather physiologic, physical and psychological readiness. In infancy, babies frequently are unable to hold large amounts of urine in their bladder and void small amounts. This comes hand in hand then with the additional ability to be able to increase the interval between voids. Most will attain it by three years of age. Another component of readiness is physical readiness.
Toddlers quickly learn that they can control their bodily functions.
Once your child is showing all these components of toilet training readiness, most experts recommend waiting at least three months before you start toilet training to ensure that all is set. Last but not least, look at yourself and your family situation. In order for toilet training to be as painless and smooth as possible, make sure that you AND your child are ready. Some kids toilet train quite easily, while for others it becomes what seems like a long drawn out battle. If you are incredibly busy at work, moving to a new house or a new baby is due soon, it's ok to wait a few months to let things settle down.