Dear Student ,
There are two changes of energy takes place in this action .Mechanical to light energy and mechanical to electrical energy .To explain further when a generator which uses mechanical energy is used to turn the light up in a bicycle lamp the light emitted is light energy .At the same time when the generator lights up the bicycle lamp the lamp is light up using electrical energy so mechanical energy is also transformed in to electrical energy .Again in the bulb heat and light energy is produced .
Regards