Its pretty obvious how Xehanort was able to get Sora to wear clothing with X on it.
Sora's mom went to Destiny Islands Wal-Mart to buy clothes for Sora. Xemnas disguised as a Wal-Mart employee comes up to her makes some suggestions.
Xemnas: Excuse me ma'am. Clothes with X's in the design are all the rage right now. I'm sure your son would love to have his entire wardrobe consist of them!
Sora's Mom: How do you know I have a son?
Xemnas: Uh I uh....well why else would you be shopping in the young men's section?
Sora's Mom: Well I don't know, his entire wardrobe consisting of this stuff?
Xemnas: They're all 80% off! No scratch that, they're free! Just get them and get out!
Sora's Mom: Okay okay...sheesh!
Xemnas watches Sora's mom leave with the X clothes and smirks.
Xemnas: I placed a fragment of my heart inside of her.
Saix appears next to Xemnas: I always knew you wanted to be inside of Sora's mom, lord Xemnas.
Xemnas: What? She's a got a nice ass. Besides when I become king of the universe I'm going to need a Queen. (Spoiler for KH3)