Can STDs be transmitted through sharing underwear?

No . Stds are passed by having sex whether its oral, vaginal or anal sex. They are not passed by clothing or casual contact. Why are you wearing someone's underwear though?