The idiom “People who live in glass houses shouldn’t throw stones” is primarily interpreted as a warning against self-righteousness or hypocrisy. It means that you should not criticize other people’s bad qualities when you posses the same qualities yourself.
The idea is that if you live in a house made of glass, and you throw a stone at someone outside the house, you will break the glass and as a result damage your house. In order to avoid such wastage, you should refrain from throwing stones.
Lionel, if you don’t mind me saying, people in glass houses shouldn’t throw stones. You need to stop talking badly about Richard. He’s usually a very punctual person, and this is the first time that you’ve arrived early this week.
Margaret’s hair is always a mess, yet she continuously criticizes other people’s hairstyles. Honestly, people who live in glass houses shouldn’t throw stones.
Thomas told me I was a terrible dancer, and I told him that people in glass houses shouldn’t throw stones.
Another interpretation of the saying is that you should not attack others if you are at a point of vulnerability or get easily offended. From this perspective, it is not your actual criticism or morals that are being questioned, but the fact that you will not be able to defend yourself if you get criticized or attacked back. It is therefore wiser to keep your mouth shut.