ESP8266 would be my default for this.
If you have ever used Arduino, then this would be crazy easy. Otherwise, just merely really easy.
There is a add-on for the Arduino IDE that lets you program the ESP8266 microcontroller directly. Examples are included from which you could quickly cobble together a working solution. This application, monitoring a couple I/O pins and activating a relay, is not a demanding one so all the people screaming about the overhead and inefficiency in Arduino need not bother. Besides, you can run this 32-bit MCU at 160 MHz if you want to.
Even the smallest $2 ESP-01 module has enough I/O for this task,
provided that you don't use the serial port so that you can re-use those pins as I/O. Otherwise look into one of the other slightly bigger variants, or add a I2C I/O expander like PCF8574, which has the added benefit of protecting the MCU I/O pins from damage.
Since these are WiFi, you have the choice of using a central node as a task-dedicated access point, or just configure them all as clients and connect to your existing WiFi LAN. A major drawback to consider is power consumption. The ESP8266 is power hungry particularly when communicating over WiFi.
NRF24L01+ are also nice ... available, powerful, and cheap, and have much lower power consumption. But you need an external MCU to control it.