Verse 37 is a favorite verse for people to quote who love their sin. They don’t want to hear that what they do displeases God or anyone else. But as the context shows, the point Jesus is making tells us that we must not be hypocrites.
Treat others as you want to be treated. You don’t necessarily know as much as someone else, especially if your eyes have not been opened to the truth of God. Verse 42 makes it clear that we are supposed to point out to our brothers and sisters their sins&emdash;once we have confessed and repented of our own. What happens if we accuse while we have unconfessed sin? They rightfully us in return, and no one actually repents.
This is the point of the comparison of good trees and bad trees, and the fruit they produce. Hearts that have been cleaned of their sins are the only ones able to produce good deeds. This includes the discernment needed to see sin in someone else’s life and also the love and wisdom needed to help someone receive the rebuke.
Teach us to speak the truth in love to everyone, and to confess and repent of our sins quickly.