I've got an Arduino UNO, 4-channel relay board and the ESP8266 module tucked into an electrical box with four power plugs coming out of it. I can (wirelessly) control each plug's power status from any device connected to my home wireless network, the same network the ESP is connected to. The only thing I need to know is the local IP address assigned to the ESP module. (So for permanent installations, it's probably better to assign it a static IP address.) Then I send an HTTP request to http://esp_ip_address/?command=0100E and wait for the board to react. (Yes, the "E" is necessary.) Every so often a request fails, but this is pretty rare. There is a return message, a JSON object containing the board's current pin power settings, so you can easily just wait for this to be returned in order to know that your command was successfully processed.
Because I left pins 0 and 1 unused, the IDE's Serial Monitor function can be used to watch and make sure the ESP connects to the network successfully. It'll also print out the IP address it is assigned. There are a few improvements I want to make, mostly related to latency, but it does work as-is and I've successfully tested it with everything running for multiple days. Thought I'd share it to get some suggestions from everybody here.
You'll need to modify the sketch with the SSID of your wireless network and its password, of course. I think you might also be able to connect directly to the network hosted by the ESP... haven't tested that yet. If you've gotten this far you have probably already figured out how to build this into something cool.
Anyway, here you go:
https://github.com/ckuzma/ESP8266-Arduino-Sketches/blob/master/light_server.ino