This trick uses Tasker, IFTTT and a Belkin WeMo to get the job done. Essentially, it works like this: when you come home, your phone automatically connects to your Wi-Fi network, which triggers a Tasker task that sends a text message to IFTTT, which turns on your lights using the Belkin WeMo. It takes a bit of setup (since it involves two different services), but it's incredibly easy to do.
Of course, turning on the lights isn't that hard, but you could use this for a lot of things (like a fan, air conditioning or your computer). Check out the video above to see it in action.
Control Your Lights with Your Android Phone [XDA Developers Blog]