Rui Santos from Portugal has written an excellent, comprehensive tutorial for those who want to get into ESP8266 boards and control them from a Raspberry Pi. He uses Python on the Raspberry Pi, with imported MQTT libraries, and C code for the Arduino-like ESP8266. The ESP8266, which is on the same network as the Raspberry Pi, then ‘subscribes’ to a page on the Pi which is changed when a user clicks on a button on the Pi’s web interface. And voila! You can click a web button and have an LED connected to the ESP8266 light up wirelessly! You can read the tutorial here.
ESP8266s must be the flavour-of-the-month, I only posted about reading sensors using one the other day!