Genshin Impact has a day and night system, which you adjust the time to freely in the game menu. You may use it for certain NPCs to appear or just for some beautiful screenshots.
Note: Skipping time won't affect the respawn time of items.
Some quests and puzzles require a certain daytime or time window to be accessible and completed. Remember to read the quest description or the notes in your backpack related to that quest!
Depending on the time, NPC can appear or disappear from a location.
For example, most of the vendor NPCs only appear in the day and disappear in the night, althogh there are some vendors that do the oppsosite.
This is not only happening within the city, but also in many locations across Teyvat. If you arrive at the correct time and place maybe you will come across an NPC that sells you rare materials for a low price or even give you an item for free!