The Apostle Paul in teaching the Romans preached against a multitude of sins.
“For this cause God gave them up unto vile affections: for even their women did change the natural use into that which is against nature: And likewise also the men, leaving the natural use of the woman, burned in their lust one toward another; men with men working that which is unseemly, and receiving in themselves that recompence of their error which was meet.” (Romans 1:26-27).
People wanted to be wicked so God allowed them to use their agency and choose to do wicked behaviors, in this case, homosexual behaviors. This condemnation was particularly appropriate for Roman society as homosexual behaviors were occurred with some frequency. This is not all; next comes a list of other sins.
“And even as they did not like to retain God in their knowledge, God gave them over to a reprobate mind, to do those things which are not convenient; Being filled with all unrighteousness, fornication, wickedness, covetousness, maliciousness; full of envy, murder, debate, deceit, malignity; whisperers, Backbiters, haters of God, despiteful, proud, boasters, inventors of evil things, disobedient to parents, Without understanding, covenantbreakers, without natural affection, implacable, unmerciful: Who knowing the judgment of God, that they which commit such things are worthy of death, not only do the same, but have pleasure in them that do them.” (Romans 1:28-32).
Homosexual behaviors are grievous sins, so are all sexual sins, murders, envyings, deceits, covetousness, and so forth. Those who sin in ignorance are not without blemish but those who know “the judgment of God”, those who know that doing such things are sinful behaviors yet still do them and take pleasure in doing them are particularly condemned.
Then comes a statement even more condemning of certain people:
“Therefore thou art inexcusable, O man, whosoever thou art that judgest: for wherein thou judgest another, thou condemnest thyself; for thou that judgest doest the same things. But we are sure that the judgment of God is according to truth against them which commit such things. And thinkest thou this, O man, that judgest them which do such things, and doest the same, that thou shalt escape the judgment of God?” (Romans 2:1-3).
Paul said that we have to be careful in judging others. It is okay to judge in truth but we better not be hypocritical and judge and condemn others when we secretly do what they do – not necessarily the same sins but sins that fill us with wickedness. If we can judge without hypocrisy, then such judging is allowable, as long as we try not to stand in the place of God without authority. In general, we need to worry about beams in our own eyes but it can be appropriate to judge others at times, as long as we do so without hypocrisy.