Noob wiring/software help for esp8266

using these Gebildet 5pcs 6mm 3V-4.5V-5V-6V-7.5V-9VDC Waterproof Signal Lamp with Wire, LED Metal Indicator Light Energy Saving(Red) : Amazon.co.uk: Business, Industry & Science

when i say altered it i mean i attempted before realising someone whom has never coded will probs struggle for hrs and its best just to ask someone who knows, the code is posted is the original. the schematic is microcontroller gpio pin to toggle switch terminal. the switch has two terminals with the other returning to the microcontrollers ground. The microcontroller is powered by 5v microusb. with this setup the code and its intended function works. What i would like to know is how to add an external light to the equation. will draw up a schematic when i sit down although dont expect anything fancy as ive never done it