AA Battery Packs 54950c01 vs 59510c01
The main functional difference between these is the electrical connector. The one with the red switch uses the old style 9V connection, while the one with the orange switch uses the newer Power Functions connector.

These are both the same voltage (9V), and you can mix the two systems using the Power Functions Extension Wire (8886).



Here's an example showing a PF battery box powering buggy motors: