In a galvanic cell electrical energy is generated at the expense of chemical energy. In such types of cells, a spontaneous chemical reaction generates electric current.
Hence, the galvanic cells are used as a source of electric current.
They are also called voltaic cells.