Noob wiring/software help for esp8266


this is the schematic in the vid though its for a button with a integrated led. When i try plug a external light into the vin pin as he did it doesnt work. ive since learnt from google that the vin pin is normally an input? So dont know the science of what he did in that diagram