How can the judiciary maintain a balanced role between criticism and support of government actions?

Justice Bhuyan mentioned that the judiciary must avoid being either a constant critic or a cheerleader. I want to understand how the courts can strike this balance, especially when dealing with sensitive or controversial government policies.