Jesus just indicted to her that He knew about what she had done. Hence the reason she runs back to her town and tells the people to come meet a man who told her everything she ever did. And because of this exact testimony, many Samaritans from her town believed. And many more came to believe from hearing Jesus' own words.
Notice too that Jesus was talking to a woman alone (which of course surprised his disciples, who focused more on this fact that on what Jesus was actually talking with her about). A Samaritan woman at that. Says a lot about how Jesus operated and the conflict (and outrage) he caused among the religious folks of his day.
btw, if Jesus was judging her, He could. He is God. You and I aren't though.