According to the canon: When Krypton's destruction was imminent, Jor-El quickly wrapped his infant son Kal-El (Superman) in his clothes, sending him in a homemade spaceship towards the Earth. Just moments before the explosion of Krypton, his wife Lara realized that he will need a pair of underwear. Knowing it'll be too late to take out his clothes and wrap him up again, they slipped the underwear over his pants before trajecting him to Earth, forever creating the iconic image we see today [1].
*[/s]