Your appearance should be consistent with your reason for coming. If you are here to "sightsee" but you look like a homeless person, wearing filthy clothes that don't fit well, carrying a broken piece of luggage tied up with rope, shoes with holes, etc, the officer is likely to think:
This person looks too poor and desperate to afford this vacation. Perhaps someone bought them a ticket in exchange for carrying something. Or perhaps they intend to take advantage of public services here and never leave. I'd better check a little more carefully.
If you are here to "sightsee" but you are wearing a 3 piece business suit, carrying a large briefcase, and wearing "slippery city shoes", the officer is likely to think:
This person might be here for a job interview or perhaps has a job already arranged. They could be planning to work without a permit or even to move here without the right paperwork. I'd better check a little more carefully.
If you are here to "visit a cousin" but you are wearing work boots, overalls, and a workshirt, the officer might think you don't own any non-work clothes, again leading to wondering how you can afford the trip and what's really the purpose of it, or they might think you intend to work.
Grooming issues, like how recently you shaved, factor into this a little: the person who is ungroomed to the point of society disapproving may trigger the "too poor to really be traveling" thoughts in an officer who should know better. And yes, there may be some officers who see a beard, especially on a middle eastern face, as a little threatening, and who subconsciously decide to check a little more carefully.
Now, in theory, this "check a little more carefully" shouldn't matter if all your papers are in order. You can look homeless, but if you can show you're gainfully employed and can easily afford the trip, the fact your shoes have holes in them shouldn't keep you out. You can look like an IT consultant headed to a client, but if you can show your itinerary and plans to tour the country by train and see this, this, and that museum, castle, lighthouse and lookout, then your business-like demeanor shouldn't keep you out. The same goes for looking somewhat threatening. In theory. Reality is not always like that, so some people work extra hard to make sure they don't trigger any extra checking or suspicion. It's your choice.