Rashi in Sanhedrin 22b and the gemara in Taanis 17a shed light on the matter. Rashi there says that when a group of kohanim used to switch posts, the incoming kohanim would get a haircut so that they will be seen in a handsome state (Rashi, Mishmeros”). So too the gemara in Taanis quotes a pasuk in Yeshaya as to why a king should get a haircut every day: “Rebbe Abba bar Zavda says that the pasuk writes: ‘Your eyes shall see the king in his beauty’ (Yeshaya 33:17).”
The Kohanim doing the service of Hashem in the Beis HaMikdash represent the Jewish nation in the spiritual realm. If one is representing such an important post, the spiritual center of the world, then it makes some sense that if he does not live up to what he stands for, representing Hashem during his job of serving in the Beis HaMikdash, then he deserves Heavenly death. So too the Jewish King was chosen by Hashem to represent all of Klal Yisrael, and therefore they have a responsibility to look put-together and fashionable in the eyes of those who see them. It would seem the more important you are, the more meticulous you have to be with your presentation. This is why a regular Kohen received a haircut once every thirty days, the Kohen gadol receives one weekly, and the king gets a haircut every day.
In a similar vein, when in yeshiva I was taught that as a yeshiva bachur in high school it is appropriate to wear a button-down shirt and dress pants, as well as a hat and jacket for davening. When I got into beis medrish, post high school, it was expected of us to walk outside with our hat and jacket, and at least be holding them in hand during the summer if too hot while walking outside in public. When we got married or was learning in kollel, we put on a tie every day. Those that leave the yeshiva and are the heads of institutions, ravs of shuls, or are classroom rebbes, normally wear suits. Indeed, the head Roshei Yeshiva in Chofetz Chaim of Queens wear a long coat and top hat. All for the same purpose, that the more important a person is in society, he must present himself in a correspondingly formidable fashion, because he is representing kavod haTorah, the honor of Hashem and his Torah.
This applies to all Jews as well, for we are all princes of The King Of All Kings, The Holy One Blessed Be He. My Rosh Yeshiva, Rav Henoch Leibowitz zt”l, used to say we have to dress “elegantly conservative.” A guideline for all Jews is spelled out in the Orchos Tzadikim: “The proper course for a person to follow is to be clean in all of his affairs, for cleanliness is the road to good deeds. What shall he do? Let him wear plain clothes, neither expensive, gaudy attire that everyone stares at nor pauper’s clothes that shame the wearer, but plain, pleasant, clean garments, the poor man according to his state and the rich according to his. And it is forbidden to wear stained or soiled garments. They should not be torn, and they should not be stylized in the manner of the haughty.” (Click here and here for Hebrew text)
Being the representatives of Hashem to the world, we have a responsibility to look presentable; not too lavish, but not raggedy. Rather, plain, pleasant, and clean. Everyone according to their status of importance is expected to dress and look responsibly for the sake of Hashem’s honor.