Legalization makes marijuana (and other drugs) safer for a lot of reasons:
1. You could buy pot from government-controlled places, where quality of the drug is guaranteed (no fillers!).
2. Users whom drug intake become problematic can legitimately seek help, which is more unlikely if your drug of choice is illegal and stigmatized in your society.
3. You don't have to get into illegal, dangerous drug trade in order to get your drug of choice. You can buy pot in the nearest coffee shop, safely (for example).
That surely happened in the Netherlands. I fail to see it as failure. What I see as failure is the growth of a culture that condemns drug use, as if it is something absurd and immoral, when in fact it _isn't_. People has been smoking pot world-wide, for thousands of years, without causing harm to others.
I could go on and on about the immorality and degenerating effects on society caused by the _drug war_, which is much more damaging than drug use itself, but I think I'll stop here.
EDIT: I'd like to make clear that, although a pot smoker myself, I don't think using drugs is inherently good or bad. In fact, in most cases, it can be (very) bad. But the fact is that people do drugs and will always do drugs, most without major bad consequences for themselves and others. Drug use is a fact in most societies (if not all), and that being so, it would be better that we manage it the best way we can. Criminalizing it certainly is not the best way (probably the worse).