Why couldn't the disciples cure the boy with epilepsy in Matthew 17:14-20?
First thing to notice is that Matthew takes this story from Mark, where the boy is described as having a “spirit that makes him unable to speak; and whenever it seizes him, it dashes him down; and he foams and grinds his teeth and becomes rigid” (Mk.9:17). Luke also follows Mark and says that a “spirit seizes him, and all at once he shrieks. It convulses him until he foams at the mouth; it mauls him and will scarcely leave him” (Lk.9:39).
Matthew interprets these as signs of epilepsy. It was believed that this and other sicknesses were produced by demon possession. That is why Mark, and Luke, talk about “casting it out,” that is, exorcising the demon. For some reason at the beginning Matthew does not mention the cause of the boy’s condition as being an evil spirit; he just says that he is an epileptic. But in verse 18 he does: “Jesus rebuked the demon, and it came out of him.”
The disciples could not heal the boy because of not having enough faith. It is important to notice that Matthew does not say “lack of faith” but “little faith.” So, the disciples have faith, but not enough, a recurring theme in the first gospel. Their faith had to grow, mature, if they wanted to perform these kinds of actions. And the example he gives is that of a mustard see, perhaps the smallest of all seeds in the Mediterranean world. Having that kind of faith, the disciple would be able to move mountains, an obvious hyperbole that drives the point home.