Your question gets at two related points: What allows materials to conduct, and what allows materials to be transparent.
Conductivity requires easy movement of charge through a material. Typically this charge is in the form of electrons but in an electrolyte the charge movement is primarily ions moving in the fluid. The quantum-mechanical nature of electrons means they can only exist in certain, discrete energy levels. The specific levels available depend on the electron configuration of the atoms or the (more complicated) electron configuration of molecules. Good conductors have many closely-spaced energy levels available to electrons and very little energy is required to move them between these levels. This is the band theory of conductivity.
The opacity of a material also depends on the electron configurations in the material and the energy levels available. The energy of a photon is proportional to its frequency which means materials tend to act as a low-pass filter. High energy (high frequency) electrons have enough energy to kick electrons into higher energy states which cause the photon to be absorbed. If the material has big gaps between the energy bands then photons won't have enough energy to force an electron energy transition so the light will pass through without being absorbed.
Generally conductivity and transparency are at odds with each other. Conductors need closely spaced energy levels and transparency needs widely spaced levels.
In the case of indium tin oxide has a mix of both properties. It has electron configurations that are closely spaced at low energies and then a large bandgap at visible light energies. This causes ITO to be opaque to low energy light (infrared) but transparent to visible light.