Electrolytes are vital components of an electrochemical energy storage device. They are usually composed of a solvent or mixture of solvents and a salt or a mixture of salts which provide the appropriate environment for ionic conduction. One of the main issues associated with the selection of a proper electrolyte is that its electronic properties have to be such that allow a wide electrochemical windowdefined as the voltage range in which the electrolyte is not oxidized or reducedsuitable to the battery operating voltage. In addition, electrolytes must have high ionic conductivity and negligible electronic conductivity, be chemically stable with respect to the other battery components, have low flammability, and low cost. Weak stability of the electrolyte against oxidation or reduction leads to the formation of a solid-electrolyte interphase (SEI) layer at the surface of the cathode and anode respectively. Depending on the materials of the electrolyte and those of the electrode, the SEI layer may be composed by combinations of organic and inorganic species, and it may exert a passivating role. In this paper we discuss the current status of knowledge about electrolyte materials, including non-aqueous liquids, ionic liquids, solid ceramic and polymer electrolytes. We also review the basic knowledge about the SEI layer formation, and challenges for a rational design of stable electrolytes.