I think the general answer is... only when either the cost to continue using it is too high, or a better alternative comes along.
The key term here is "willingly" I think. Many specific technologies get legislation passed to restrict them - I'm not sure that this counts as "willingly". For example, many countries have laws that restrict or ban technologies because their environmental impacts are too severe. Short of the legislation the companies/individuals benefiting from the technology would usually be delighted to carry on. It's the classic case of "the tragedy of the commons" where the cost is born by the wider community, but the profit is in the hands of those who exploit it. Everyone has an incentive to run an extra cow on the common land, even if that makes the land overgrazed and unproductive.
Other examples given above - like use of nuclear weapons - are also not really "willingly". They are agreements that have been reached due to international treaties, where huge amounts of political pressure have been a factor.
On the "what is better" angle - "better" is highly subjective. There was a comment above about societies abandoning agriculture. I haven't read that literature but I might suggest that it was "better" for their circumstances.
One specific case I do know of where societies have abandoned technologies is in early human history. So communities - particularly those living on islands or otherwise remote populations - lost their technology over subsequent generations. The theory was that a certain population size is needed to maintain skills and specialisation, and when populations were too small technological innovation stopped or went backwards. The book "The Rational Optimist" explores these ideas (I have issues with some of the authors conclusions about more modern events).