I think one problem in getting help on this task is that there are far too many ways to do it.
But however you do it, you can break it in half, solve the two halves separately, and connect them. The two halves are: how to control a light from the Pi, and how to invoke a task on the Pi over the Internet.
The easiest way to control a light from the Pi is to wire the LED, with suitable current-limiting resistor, to a GPIO pin and ground on your Pi. Then write a program in your favorite language to turn the GPIO pin on and off. If you want to skip the wiring part, you could perhaps use one of the Pi's built in status LEDs (the ones that are by default set up to indicate power and disk activity).
There are many ways to invoke a task on the Pi over the Internet. One way is to use ssh to connect a terminal session from a distant computer to your Pi. Then you can type any command at the command line. Another way is to write your own software to listen on a particular port for commands, and then connect to that port using either custom software or something like telnet or PuTTy. Another way is to set up a web server on your Pi, and write some php code or similar to invoke a command when a web page is visited or a button on a page is clicked. There are more ways.
The job of invoking a task on the Pi over the Internet can further be divided in half: Invoking a task on your Pi from another computer on your local area network, and setting up your router so that computers outside of your home network can get in and connect to your Pi to invoke the task.
Any time you enable someone to connect to your Pi from the broader Internet, you at least have some potential for malicious actors to try and get in. Don't open more ports than you need to. Don't expose your Pi to ssh without first 1) disabling root logon, 2) changing the default password for the "pi" account, if not eliminating that account entirely in favor of some account with a nonstandard name. People WILL look for an open port 22 and try to brute-force guess the password to your root account.
You'll have to open a port on your router and forward it to your Pi. If your ISP doesn't provide you with a static IP, you'll have to use some sort of dynamic DNS system to publish your IP address.