Question: Why do most programmers/developers use a dark theme while writing software/code?

Answer: Because light attracts bugs.

@nixCraft

Easier on the eyes...

Prolongs the life of your LED screen, particularly if it's OLED.
@ferricoxide @nixCraft and safes energy.
@SomeAnoTooter
You're thinking of turning the screen brightness down
@phi1997 no. I'm thinking of oleds ;)