Staking a newly planted tree can be essential to its survival. This is especially important if the tree is in an open area where it is exposed to a lot of wind. However, it is important to remember that there is such a thing as babying a tree too much.
As living creatures, trees adapt to their environment as they grow. When they are exposed to wind they sway back and forth. This swaying motion stimulates the growth of lateral roots that help support the tree. The more a tree sways the larger and more numerous these roots become.
When a tree is staked it is prevented from swaying and thus doesn't develop these roots as prominently as it should. If it is staked for too long then it won't be prepared for when it is set free and can result in it falling over.
The general rule of thumb is to keep a tree staked one year for every inch of trunk diameter. (i.e. if you plant a 2" tree, it should be staked for 2 years).