Judge not, that ye be not judged.
For with what judgment ye judge, ye shall be judged: and with what measure ye mete, it shall be measured to you again.
And why beholdest thou the mote that is in thy brother's eye, but considerest not the beam that is in thine own eye?
Or how wilt thou say to thy brother, Let me pull out the mote out of thine eye; and, behold, a beam is in thine own eye?
Thou hypocrite, first cast out the beam out of thine own eye; and then shalt thou see clearly to cast out the mote out of thy brother's eye.
A note I'd like to make: This was given as part of the Sermon on the Mount. This particular sermon was among the most notorious sermons given by Jesus, and therefore of all Christendom, because this was when the Higher Law was presented to the people of Israel, to take place after the fulfillment of the Law of Moses. This higher law replaced "an eye for an eye" with "turn the other cheek." The great commandment was now - Love the Lord, thy God with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength, and the second commandment - Love thy neighbor as thyself. In this parable Christ is trying to teach these great laws to the people.
His words begins with the words, Judge not that ye be not judge. Joseph Smith, when he went through the Holy Bible with the Urim and Thummim, translated this verse to read:
"Judge not unrighteously, that ye be not judged" (JST Matt. 7:1, italics added).
It is human nature to judge. Judgments in our minds happen too fast to realize at times. Sometimes we see people, and based on how they look, think they belong in some clique or other. But first impressions are not always accurate, and Christ is trying to teach this. People tend to see the problems in others without looking at the problems of themselves.
Christ, in this parable, speaks of a mote in another and a beam in us. In Greek, the word 'mote' means a speck or splinter, and the word 'beam' refers to a wooden post used in constructing houses. Now notice who it is that has the tiny speck and who it is that has the large mote in the eye. It is us with the large mote that try to rid others of a tiny speck. Christ teaches, First cast out the beam out of thine own eye; and then shalt thou see clearly to cast out the mote of thy brother's eye.
The Lord in this parable is trying to teach the people, in both ancient days and these latter-days, to work on ourselves, our own faults. We all make mistakes, and all have problems, and so it is right for us to first clean our own selves of these things. And once we have cleaned ourselves of these things we then understand better how to help others with them.