The Mishnah Berurah elaborates on the laws and etiquette of dressing with modesty and dignity, including when and how to put on garments in a respectful order.
(א) מיושב - דאז בהכרח יתגלה גופו והאדם צריך להתנהג בצניעות ובושה לפני הקב"ה ואפילו כשהוא לילה ובחדרי חדרים הלא מלא כל הארץ כבודו וכחשיכה וכאורה לפניו יתברך. וכן צריך ליזהר תמיד מחמת טעם זה שלא במקום הכרח מלגלות מבשרו ואפילו מעט כל מה שדרכו להיות מכוסה בבגדים לעולם אבל רשאי לגלות ידו עד קוב"דו וצוארו עד החזה ע"כ האנפלאות יראה ללבשם או לפשטם ג"כ תחת הסדין שלא לגלות רגליו שדרכן להיות מכוסות לעולם במדינות אלו שאין הולכין יחף אפילו בקיץ וכן כל כיוצא בזה אם לא שאי אפשר בענין אחר וכן בבית המרחץ שדרכן של בני אדם לילך שם ערומים וא"א בענין אחר אין בזה משום פריצות וכן כשרוחץ בנהר הדין כן רק יזהר לפשוט וללבוש סמוך לנהר כל מה שאפשר בכדי שלא ילך בגילוי הגוף שלא לצורך ואפילו ערותו א"צ לכסות בירידתו לנהר ולא עוד אלא שהמכסה נראה כאלו בוש בדבר וכאלו כופר בבריתו של אברהם אבינו אך בעלייתו מן הנהר שפניו כלפי העם ישחה או ישים ידו כנגד ערותו לכסותה ובלבד שלא יגע בה כמו שיתבאר בס"ס ג'. איתא בש"ס חלוק של ת"ח כל שאין בשרו נראית מתחתיו. והאידנא אין נזהרין בזה משום שהולכין הכל בבתי שוקיים ואין הבשר נראית: (ד) לחוץ - ויראו תפירות המגונות ואמרי החלוק ויתגנה בעיני הבריות ואם לא נזהר והפך אם ת"ח הוא צריך לפושטו ולחזור ללבשו כדרכו שלא יהיה בכלל משניאי ח"ו ושאר כל אדם אין צריך ולתפלה אפילו כל אדם צריך לפשטו וללבשו כדרכו שראוי אז להדר בגדיו כמבואר בסימן צ"א. טוב שישים שני צדי המלבוש ביד ימינו וילבש הימין ואח"כ השמאל ויכוין כי הכל נכלל בימין ומן הימין בא לשמאל. כתב הרמב"ם מלבוש ת"ח יהיה מלבוש נאה ונקי ואסור לו שימצא בבגדו כתם או שמנונית וכיוצא בהם. ולא ילבש לא מלבוש שרים שהכל מסתכלים בהם ולא מלבוש עניים שהוא מבזה את לובשיו אלא בגדים בינונים נאים ע"ש עוד:
From a sitting position - For then he will certainly reveal his body, and a person must conduct himself with modesty and shame before the Holy One Blessed Be He; even when it is nighttime and he is in [the privacy of] his own room, behold, "the entire world is full of His Glory" (Isaiah 6:3), darkness and light are the same before Him. And one must always be careful, for this same reason, unless there is no other way, from revealing one's body, even a little, whatever is normally always covered with clothing; but it is permitted to reveal one's arm, up until his elbow, and one's neck, up until the breastbone; therefore, [regarding] socks, one should put them on and remove them under the sheets so as not to reveal his feet which are normally always covered in these countries, for no one walks barefoot, even in the summer. And so too anything similar, unless there's no other way [to get undressed/dressed without revealing parts of the body that are normally covered]. And so too in a bathhouse where it's normal for people to walk around naked, and there's no other way (ie. you can't wash yourself with your clothes on), there's is no issue of immodesty; and similarly when one is washing in the river, the law is the same (ie. you can't wash yourself with clothes on), except that one should be careful to remove and put on one's clothing as close to the river as possible so as not to walk uncovered unnecessarily, and one does not even need to cover their genitals when descending into the river, and not only that, but one that does cover them up appears as if he is embarrassed about it (ie. about his bris milah) and as if he denies the Covenant of Avraham Avinu; however, when ascending from the river, where one is [potentially] now facing others, he should hunch over or place his hands over his genitals to cover them, as long as he does not [actually] touch them as will be explained at the end of siman 3. It's brought in the Talmud - "The cloak of a Torah Scholar is one where no skin can be seen underneath" (ie. it covers the entire body). But [nowadays] we are not careful with this because everyone goes out with pants [and socks] and the skin is not seen [anyways]. Inside out - And people will see the ugly stitching and fasteners of the shirt and it will be disgraceful in the eyes of the people. And if one was not careful and did not reverse it - if he is a Torah scholar, he must remove it and put it back on the right way so that he will not be in the category of those who, Heaven forbid, cause others to hate Hashem; and for all other people, it is not necessary. But for prayers, even all other people must remove it and put it on the right way, for it is proper to wear honorable clothing, as is explained in siman 91. It is proper that one should hold both ends of the garment in his right hand and then put on the right side first and then the left side and he should have in mind that everything is included in the right [side] and from right it comes to the left. The Rambam wrote that the clothing of a Torah scholar must be pleasant and clean and it's forbidden for there to be a stain or oily residue or a similar thing [on it]; and he shouldn't wear clothing of royalty that [will cause] everyone will stare at him, and not poor man's clothing which is degrading for the one wearing it, rather he should wear regular clothing which are pleasant. See there (in the Rambam) further.