The environmental impact of an item of clothing continues throughout its entire life cycle; from the water, land etc. used at creation, and the waste generated during fabric and garment production and the dyeing processes, to transport and water use post creation, and, eventually, to how it is discarded.
Secondhand, vintage, pre-loved, previously owned, or whatever else you may call clothes that have been owned and worn before, are a very important part of conscious consumerism and the slow fashion movement. As with the recycling and upcycling of garments, buying and selling secondhand clothes reduces the need for, and impact of, landfills, and thus improves the sustainability of the pieces themselves. Extending the average lifespan of an item of clothing, currently 2.2 years, by just three months of active use, would lead to a 5-10% reduction of its carbon, water, and waste footprints. So, selling or donating a garment instead of throwing it away, and choosing to buy a secondhand item over a new one are indeed ethical and sustainable choices.
This being said, buying secondhand clothes may be a sustainable and ethical choice, but that does not necessarily make secondhand clothes sustainable or ethical. This may sound like sorcery, but it is completely logical. Depending on the garment, secondhand clothing is probably more sustainable than most new clothing, considering that most of our clothing is mass produced in low-income countries and shipped across the world to us, but it is not more ethical. This is because most of the garments procured at charity shops, flea markets, or clothes swaps are products of fast fashion. It is thus important to understand that secondhand clothing cannot automatically be rendered ethical by its secondhand status, because consumer-purchasing behaviour is not the only thing that matters in the ethical fashion equation. An ethical garment is actually one that is created by a transparent business that operates under fair labour conditions, works tirelessly to avoid slave labour, is safe for its employees, and whose principal mission is to improve the industry and be accountable to its workers as well as its owners and stakeholders.
The choice between buying new and secondhand clothing is still an important one though. Part of being as conscious a consumer as possible however, is being aware as possible of all the weight behind your purchases. In an ideal world, all of our secondhand purchases will be ethically produced.