Well... there's no easy answer to this one. It depends. On a lot of things actually!
I don't believe you should judge anyone. Certainly not at first sight, but not even on second or third sight. Basically, you don't know the whole past of this person, so who are you to judge?
"Yeah but this guy is always wearing this weird scarf! He's weird!"
How well do you know him? Maybe it was the scarf of the women he loved wholeheartedly, and who recently died after a long and terrible disease, and he's wearing the scarf to have the feeling that she's still right there with him...
On judging a book by its cover, there is another thing. There is something like "intuition", and that is our gut feeling, telling us things. Now, our gut feeling is not really our gut that's telling us things. It's our brain, which is processing thousands of pieces of information that it has gathered in a split second, and which it has matched to every piece of information we've come across in the past. And the result of that, is intuition. And it is not trying to explain to our consious brain what or how it is doing, it is just presented as a feeling, a gut feeling.
This intuition is a part of our monkey brain, our ancient brain, which controls our fight, flight, freeze reactions and all. We should use it, but we shouldn't let it control us.
I mostly make the comparison with driving a car. Intuition should be in the car, you should hear what it has to say. But it shouldn't be in the driver's seat. YOU need to be in the driver's seat. You need to control the weel. Listen to your intuition, learn to trust on it, and use its advice. No more, no less.
So judge a book by its cover? No, don't judge, but listen to what your intuition is telling you, it might know more than you think!