Unlike previous Pokemon Games that were released as sets for a given generation, Pokemon Sun & Moon actually take place at different times during the day compared to each other. In Pokemon Sun, the internal time clock is actually identical to the clock registered on your 3DS. So if it's daytime in the real world, it will be daytime in Pokemon Sun. In Pokemon Moon, however, the internal time clock has been inverted. This means that when its day in the real world where you are at, it should be, if your 3DS Clock is registered correctly, night in your game.
Not too many things are affected by this, outside of a number of Pokemon exclusive to either day or night and certain Zygarde Cells appearing. Jigglypuff, Paras, Poliwrath, Ledyba, Ledian, Igglybuff, Espeon, Drifloon, Yungoos, Gumshoos, Midday Lycanroc, Dewpider and Araquanid are all Pokemon found during the day within these games; Rattata, Raticate, Clefairy, Spinarak, Ariados, Cleffa, Politoed, Umbreon, Misdreavus, Surskit, Masquerain, Midnight Lycanroc and Morelull are exclusive to the night. Given Zygarde Cells in certain places also won't appear unless it is night or day (check out Zygarde Cells Walkthrough Page).