best way to communicate with a server?

I suggest you run a web server on your arduino. Send GET request to the server to either control a light, or get the status of a light. Make a simple html page to send the request. The arduino evaluates the request, performs the request, and sets an internal status variable for the light. Another GET request would request the status of the light, at which time the arduino would return the internal status variable.