Is it better to have judges who are elected as they are at the state level or appointed as they are at the federal level?

Is it better to have judges who are elected as they are at the state level or appointed as they are at
the federal level?