It was not just promoting democracy, but turning Spain into a modern European country when the alternatives, as Darius said, would have been going back to a traditionalist righ-wing authoritarian state like the Franco regime or a Carlist monarchy, or a Bolivarian people's republic a la Venezuela, none of which would have been sustainable in the long run and would probably have ended badly.
Of course, it was not JC alone who did it, but he kickstarted the process when he was the only person capable of doing it, because he correctly realized it was the only viable future for Spain, and, then, he voluntarily stepped back as he should to let the politicians run the country. And, as much as we now think of the 2008 crisis and the current public health emergency and picture Spain as crisis country, the reality is that, in the past 40 years, not only did Spain enjoy political stability, but also it was a great economic success.
Yes, I think it is unfortunate that JC has damaged his reputation and legacy so late in his life after all he had been through before (including poverty and his mother having to "sell some jewels to pay the rent" as he mentioned in the 1992 interview). But when you also hear grandees of the 1980s and 1990s like Felipe Gonzalez or Javier Solana, who are important European (not only Spanish) personalities, praising his work as king, one has to admit that, at least at his prime, he was a very good monarch.