Dark mode, first introduced in iOS 13, offers a dark mode that helps you see better and is easy on your eyes, especially at night. If you want your iPhone to automatically switch to dark mode at sunset, here's how you can set it up.

First, open “Settings” by tapping the gear icon .

In “Settings”, tap “Display & Brightness”.

In the “Appearance” section where you can choose between Light and Dark modes, tap the switch next to “Automatic” to turn it on.

Once “Automatic” is enabled, you’ll see an “Options” setting just below it. By default, your iPhone will keep Light Mode on until sunset or Dark Mode until sunrise. To confirm, tap “Options.”

On the “Appearance Schedule” page, make sure “Sunset to Sunrise” is selected by clicking on it.

If you are okay with the “sunset to sunrise” schedule, you can exit the “Settings” app now.
Otherwise, if you want to change the schedule to custom times, tap “Custom Schedule” on this page , then select the times for Light and Dark modes to turn on

After that, close “Settings” and you are done. If you selected “Sunset to Sunrise”, then Light mode will be activated at sunrise and Dark mode will be activated at sunset. If you selected a custom schedule, Light mode and Dark mode will be activated automatically at the times you selected.
Information source: howtogeek.com
