Some characters' normal gear can serve as a spacesuit for a short time - e.g., Vader's suit in the novel The Journey to The Force Awakens: Aftermath, and (credit to Rogue Jedi for this one) Clone Troopers' armor in The Clone Wars. However, I will focus on purpose-built spacesuits in this answer.
Canon:
Star Wars: The Clone Wars - Ashoka in a spacesuit



Legends:

The two Sith were outfitted in environment suits that protected them from scorching heat and noxious atmosphere.
And:
Unlike Sidious, who was outfitted in a thin enviro-suit, the Sith Lord was wearing only a cloak, narrow trousers, and a skullcap.
And:
Lieutenant Commander Villian “Vil” Dance came out of a deep sleep at the blaring alarm, sat up, and leapt from his rack to the expanded metal deck of the Ready Room quarters. Save for the helmet, he already wore his space suit, one of the first things an on-call TIE pilot learned to do was sleep in full battle gear. He ran for the door, half a step ahead of the next pilot to awaken. He grabbed his headgear, darted into the hall and turned to the right, then sprinted for the launching bay...
Vil nodded, not bothering to salute, then turned and ran. As he did, he put his helmet on and locked it into place. The hiss of air into his face was metallic and cool as the suit’s system went online. It felt very comforting. The vac suit’s extreme-temp-resistant weave of durasteel and plastoid, along with the polarizing densecris helmet, were the only things that would protect him from hard vacuum. Suit failure could make a strong man lose consciousness in under ten seconds, and die in under a minute. He’d seen it happen.


1Thanks to Hypnosifl for these