The Good or less worn tire should go on the front wheel as indicated in this Sheldon Brown Article on Tire Rotation
Although the article does hint to the fact that you should not be really rotating tires to the front wheel that may have been used on the rear wheel.
The only time tire rotation is appropriate on a bicycle is when you are replacing the rear tire.
If you feel like taking the trouble, and use the same type of tire front and rear, you should move the front tire to the rear wheel, and install the new tire in front.
The reason for this is that the front tire is much more critical for safety than the rear, so you should have the more reliable tire on the front.
If you have a blowout, if it is on the rear tire, you have a very good chance of bringing the bike to a controlled stop.
If your front tire blows, you can lose steering control, and a crash is a real possibility.
bicycles.stackexchange.com/users/3573/MrDaniel
Generally you want the best tread on the front, as a front tire skid is much more dangerous than a rear tire skid.
However, I tend to ride my tires until the cord nearly shows, and, given that flats are about 5x more common on rear tires than front tires (and front-tire flats are much easier to fix), I'd be tempted to put the better tire on the rear, to reduce flat potential.
bicycles.stackexchange.com/users/1584/Daniel R Hicks
@MrDaniel
has a very good answer, however if the bike is used XC MTB a blowout is less of a concern than handling when compared to a road bike, as MTB tires (in true off road conditions) loose performance as they loose tread, unlike a road tire.
Your riding style and ground you ride will dictate to some extent what you do.
If you have steep, slippery uphills and traction your most important problem, a better tread on the back helps.
If control is your problem and you find the front a bit sketchy - then the new one on the front would be better.
If in doubt, don't loose any sleep over it - put it on either the one you are replacing (easy - only one tire change) or the front.
Don't forget that with MTB tires they are all quite different characteristics, build for particular combinations of riding conditions and tradeoffs.
Some are designed specifically for back or front, or you change the rotation direction between front and back - therefore it is not as simple as just considering tread wear.
bicycles.stackexchange.com/users/3924/mattnz
Least worn tyre on the front, always.
I have pretty worn tyres, the back is completely smooth, and the front has maybe half a mm of tread in the middle.
Both have lugs on the shoulders.
We have been training hard for an upcoming 12-hour MTB endurance social event.
All my rear-wheel slips have been recoverable, (at least a dozen), while both front wheel slips were complete wipeouts resulting in skidding, blood and one smashed phone.
That said - "sufficient" tread on both is a really good idea.
You can get away with less tread on the road than off-road Except when the road is wet.
If you have low tread on a road bike on a wet road - you will probably go down.
bicycles.stackexchange.com/users/19705/Criggie
Place the less worn tire on the front.
You need very little tread to achieve traction on the rear tire when climbing.
Though counter intuitive, tire tread has very little impact on keeping your rear tire from slipping and spinning out on a climb.
Maintaining traction is much more about torque, and weight and body positioning on the bike.
I intentionally use a rear tire with low worn out center tread to reduce drag and increase rolling efficiency.
Center tread on the rear tire may help keep the tail from bouncing and sliding around a bit, but this is not critical in maintaining control.
bicycles.stackexchange.com/users/5173/David Sopko
Very thoughtful considerations, especially directing the thinking towards MTB terrain given that so many folks drive to trails and might not worry about pavement wear and those safety concerns as much.
My knee-jerk reaction to the original question was a more superficial performance thought for a MTB: If you rely on a knobby tread and encounter sloppy (muddy/wet) conditions with a worn-down rear tire and a newer front tire, you might be better served rotating the newer tire to the drive tire in the rear.
It would have to be a pretty bald rear tire to make the swap noticeable though.
If I have two bald tires and only enough money for one tire, I'd definitely replace the back one first if the conditions are sloppy.
bicycles.stackexchange.com/users/4693/jmmygoggle
Where should I put the least worn tyre? on the front or the back? This is for XC MTB.
Least worn tyre: front or back?
bicycles.stackexchange.com
<tire>
bicycles.stackexchange.com/questions/12488
bicycles.stackexchange.com/users/3140/Mark W
The good or less worn tire should go on the front wheel as indicated in this Sheldon Brown Article on  Tire Rotation. The reason for this is that the front tire is much more critical for safety than the rear, so you should have the more reliable tire on the front. However, for MTB, there seems to be a lack of consensus, although many believe it is important to have the better tread on the rear wheel when driving over sloppy ground. That said - "sufficient" tread on both is a really good idea.   Experts indicate that the less worn tyre should always go on the front, since a front blowout is much more likely to result in a crash. However, it is a good idea not to allow too much wear on either tyre. Some MTB riders would prefer to replace the rear tyre, as this increases grip when climbing and as rear tyres are more likely to have a blowout. Front and back MTB tyres may be different for particular terrain, so it may not be possible to rotate the tyres.
Experts indicate that the less worn tyre should always go on the front, since a front blowout is much more likely to result in a crash. However, it is a good idea not to allow too much wear on either tyre. Some MTB riders would prefer to replace the rear tyre, as this increases grip when climbing and as rear tyres are more likely to have a blowout. Front and back MTB tyres may be different for particular terrain, so it may not be possible to rotate the tyres.