Wait for any rain to stop and light the torch with blue flame. (linkshideaway.com)
He is defeated by stepping on the switch lighting the torch nearest to him. (zeldadungeon.net)
The game automatically take action if necessary (e.g. lighting the torch when traveling certain paths, etc.) though most work is up to the player. (geardiary.com)