Why are cockpit instruments white on black dials?
Right instrument face colors are inverted.

Black and white are perfect complementary colors, meaning:


  When placed next to each other, they create the strongest contrast for those particular two colors.


But for instruments if they were inverted, strong daylight shadows will make the numbers and hands harder to read, while at night with the white typically being electroluminescent or reflective for the instrument's red or white light will cause the glow to wash over the black as illustrated below:



The red is used for easier adaptation to the outside at night. Too much glow in either case goes against that.

As for digital displays, the same principle applies. Try reading an eBook in bed with the background white and the brightness to full -- it's very tiring -- that's why eBook readers have a night option where the colors are inverted.

History

The earliest mention of it I could find was from 1937 in Flight when instrument panels (the six-pack) were being standardized:


  The panel itself (...) is first anodised and then stove-enamelled a dull black -- though it may be said that the matt-grey anodic finish is very much better looking than the black panel and does not reflect light or in any way trouble the eyes of the pilot.


And here's another article from 1939 about solving the lighting issues for the instruments, not just the panel. But that wasn't always the case:


(Flight - 1913)



Image source: wikimedia.org