In order to give any meaningful answer, we must first assume the existence of free will. Otherwise, the question is moot; children are simply doing what has been predestined that they will do. But if we understand that free will is given to everyone, including children, then it's fairly easy to answer.
In the Sermon on the Mount, Jesus explained that sin begins in one's thoughts, and that it's important to keep from thoughts that can lead us to do evil. So therefore, children who don't understand the concept of sin and the difference between good and evil aren't capable of choosing to commit sin.
They can do exasperating things sometimes, usually because it's simple human nature to seek fulfillment of basic needs and they don't understand self-restraint yet, or because they crave attention and they've learned that doing certain things will bring immediate reactions from adults. But it's not until they're old enough to understand the abstract concepts of absolute good and evil existing independent of themselves and their desires that they're capable of knowingly choosing something that's wrong, and thereby committing sin.
I don't believe the Bible gives any doctrine as to exactly when that awareness comes to a child. I've seen some research in child psychology that suggests that it comes towards the end of the first decade of life, but that's hardly conclusive, and it's probably a bit different for every kid anyway.