ESP module is a great choice for cheap WiFi connectivity. But with this you get not only about $5 worth module but also a pretty good controller which can be programmed with Lua programming language. These modules accept AT commands when shipped, but you can reflash it with NodeMCU and then start writing your own scripts that can make this module work as standalone controller with WiFi functionality. OF course you are limited with four GPIOs but this is enough to do basic control and sensing. If you need more Ios, you can always drop in an IO expander.
jscottb has constructed pretty interesting robotic platform by using only ESP8266 module as controller. Programming of this module with Lua is somewhat similar to Arduino coding. TO drive robot motors he used L9110s h-brige IC and as sensors he’s chosen HC-SR04 ultrasound sensor.