If Lollipop did something wrong, it was the white system theme, as many say, and it appears that Android M is going to change that and offer people more options to choose from. The preview M edition will offer users the option of enabling the new material dark system mode.
This new theme option has selections for light, which are the default, dark and automatic. When you turn on the dark mode, the setting screens will turn to material dark. The automatic mode may be the one that switches to white or dark depending on time.
This is all a preview feature, which means that the dark theme option may be in development or it may not even pass to go live in the final release. If you have a Nexus 5, 6, 9 or Nexus Player feel free to download and flash the preview.
Source: Android Police