Like usual, there isn’t a huge difference between the two games–Ultra Sun or Ultra Moon. The general story and game world are basically the same; the main difference lies in the Pokémon you can catch, although there’s a bit more to it than that.
The first noticeable change is apparent as soon as you play the game. Since Pokémon Gold and Silver (although it took a brief hiatus), the time in the game world follows the time in the real world (or at least the time according to your 3DS or 2DS’s clock). This is 100% true for Ultra Sun, but in Ultra Moon, the in-game time is offset by 12 hours.
That means when it’s day in Ultra Sun, it’s night in Ultra Moon, and vice versa. Since the in-game time runs off your system’s clock, you can simply offset your system’s clock by 12 hours to cancel out the effect in Ultra Moon. Of course, you’ll have to be wary about affecting other games you’re playing (like Animal Crossing)!
The list is slightly long, so please refer to its own page.
Rockruff is a unique Pokémon that can evolve into one of two different forms depending on which game you’re playing. In Ultra Sun (and Sun), Rockruff evolves into the Midday Form Lycanroc. Meanwhile in Ultra Moon (and Moon), Rockruff evolves into the Midnight Form Lycanroc.
There’s a tiny catch though! Midday Form Lycanroc and Midnight Form Lycanroc–the Pokémon themselves–are not exclusive to any one version. Later in the game, you’ll find both forms in the wild–Midday during the day and Midnight during the night. But if you want your Rockruff to evolve into a different Lycanroc, you will need to trade.
Similarly, there’s one more very special Pokémon that evolves into one of two different Pokémon depending on which game you’re playing. But for the benefit of those venturing into Alola for their very first time, we’ll keep our lips sealed! (Don’t worry, it should become very obvious when you reach that point.)
While the story and events that take place are largely the same in Ultra Sun and Ultra Moon, there are some small differences. Most notably, the two members of the Ultra Recon Squad (newly added to Ultra Sun and Ultra Moon) that you meet. Also, the Totem Pokémon encountered at the end of your first island trial. And, of course, the scenes involving Solgaleo and Lunala.