The energy stored in a flashlight battery is
chemical energy.
This chemical energy is stored in the battery's chemicals (usually in the form of electrolytes and other materials inside the battery). When you turn on the flashlight, a chemical reaction inside the battery occurs, converting that stored chemical energy into electrical energy, which then powers the light bulb (or LED) to produce light.