In theory, more efficient software would reduce the co2 emissions of data centers. Which already account for more than 1% of global emissions. This means writing more efficient code by using appropriate algorithms & data structures and using efficient languages.
We could also question the recent trend to move more and more software into the browser or GUIs based on browser engines (like electron). Which surely burns through more electricity than an old school win32 GUI.