First of all, whether we like to admit this or not, making judgments is part and parcel to being human. To judge something is not fundamentally negative, but instead, it means to form an opinion or evaluation. The capacity for judging is at the center of moral competence. The lack of moral evaluation may lead to further moral laxity, and this is not what Jesus, nor any New Testament writer, ever taught.
Second of all, a neutral stance concerning the moral behavior of other individuals and their questionable actions is not always a sign of admirable open-mindedness, but could point to a deeper issue, a corresponding unwillingness to apply morality to one’s own choices as well. Being non-judgmental and overly judgmental are both negative and neither accomplish “judging righteously.”
Third of all, the point of the passages in Matthew 7 and John 7 is to judge properly, to judge fairly, and to judge honestly. It indicates care and the well-being of others. It develops others and could develop community among those close to us.