Answer: The Gemara (Bava Kama 82a) writes that one of Ezra’s ten decrees was that one should wash their clothes on Thursday in honour of Shabbos (See Shulchan Aruch OC 242:1). The Magen Avraham (OC 242:3) explains that the reason is that people should not be preoccupied with their laundry while they’re supposed to be otherwise getting ready for Shabbos. The Mishna Berura (242:5; Shaar Hatziyun 242:16) quotes the Elya Rabba (242:9), who writes that the main reason is to ensure that nothing prevents one from having clean clothes for Shabbos.
R’ Yehoshua Neuwirth (Shemiras Shabbos Kehilchasa 42:n13) questions whether this decree still applies nowadays when we wash our clothes in washing machines. He quotes R’ Shlomo Zalman Auerbach, however, who held that since we typically wash our clothes for the following day, it is ideal to do our laundry on Thursday as that best demonstrates that we are washing for Shabbos.
R’ Benzion Abba Shaul (Ohr Letzion 2:16:1) writes that while Ezra’s decree still applies, one can wash their clothes on Friday if they have a dryer that can dry their clothes before Shabbos. He adds that this decree never applied to young children’s clothes.
The Ben Ish Chai (Lech Lecha 2:8) and Kaf Hachaim (OC 242:20) write that if one didn’t manage to wash their clothes beforehand, they may still do so on Friday.
In conclusion, it is ideal for one to wash one’s clothes earlier during the week, though one may do so on Friday if necessary, especially if one is going to wash and dry them before Shabbos.