This, of course, is something of a topic of controversy because we do not know what the costs and benefits would be. Some things that might be costs and benefits include:
The major benefit would be in lives and money that will no longer be lost. There is no doubt that the US would have fewer soldiers killed and less money spent if we withdrew. A less tangible benefit might be an improvement in our relations with other countries. If we were not seen to have a huge presence in a Muslim country, killing Muslim people, we might be seen in a better light.
The major possible cost would be the loss of any control over this area of the world. If Afghanistan were to once more become a training ground for terrorists, another terrorist attack might be committed on US soil. This possibility is a major cost of withdrawing troops. One might also argue that a withdrawal will reduce US prestige because we will be seen to be abandoning our allies in the area.
Outside of the benefit of less loss of life and money, these are mere conjecture, though, and arguments can be made against each of these purported costs and benefits.