The most reliable way is to understand someone. This is limited by their ability to hide the truth from you, and helped when you get information you trust.
The next best thing is to use all the information you gather about the Nature of Their Identity to take educated guesses as to why someone behaves the way they do.
The worst way to judge people is to use your own view of the world. This is bad because the other person does not necessarily share your view of the world, and so you are likely to completely be wrong. Respect different cultures.