How do you trade from the sun to the moon?
Both you and your trading partner must press X to open the menu. You have to press the touch screen to connect with each other. You can trade or battle from there. As soon as the first Pokemon center is found, you can do this.