Optical imaging of nanoscale electrochemical interfaces in energy applications