If a lightbulb is powered by something like a C battery, the chemical energy from the battery acid is transformed into light and heat energy in the lightbulb. If it's powered by a potato (a common science project for kids) the stored chemical energy that the potato gets from sunlight does the same thing as the acid.