In most western democracies (and certainly in Westminster-style democracies, which I know best) the judges are bound by a certain set of rules that limit how activist they can be: specifically, a constitution. They're required to make findings of law, nor findings of morality, so they can't just manufacture law or destroy law as they see fit: they need a different law they can point to which overrules the one in question. Hence the US Constitution, which acts as the highest law in the land. A judge will always reference their decision, in the end, to an established law (or the constitution).
Conversely, elected officials are empowered to _make_ law. Less true in the US (where the constitution binds the hands of the legislature and executive), but very true in Westminster systems where parliament is the supreme authority.