Third installment in what's become my "Mega" article series. See "Getting Started" and "reviews".
[Updates to fully address all the criticisms in the comments noted [in brackets].]
WiFi devices are common, and appealing since they usually don't require a hub/bridge/router/switch/controller. This makes Wifi devices a great choice for beginners. I don't want to discourage beginners from taking the leap into smart hominess, but it is best to avoid WiFi. Sometimes that's not possible or impractical (eg security cameras and tvs), but otherwise buying any WiFi product should be considered a temporary solution. [If you have WiFi devices that are working well, don't run out and replace them just because, but be aware of potential problems with both existing and new devices.] Below are the reasons why, and some of these only manifest after having numerous devices, and/or compound with many devices. What works for one device may not work for 10.
1 - Different devices have different network needs of speed vs bandwidth. Phones, tvs, etc., require a balance between number of requests (latency) and data usage (bandwidth). Smart home products make many tiny requests, often with a need for super fast response times (eg you will notice any delay over about 100ms when turning on a light, but you aren't going to notice the buffer bar of YouTube being 50ms shorter). Too many requests can slow a router that is designed for higher throughput and fewer connections. This is true for any network, but adding home automation devices to a home network compounds the risk. Not only can home automation suffer from playing a video game while streaming video, but playing a video game can suffer from home automation devices. It would be best to separate high bandwidth from high request devices to separate networks - see #6 and #7.
2 - Inference is a bitch! Interference isn't just caused by two sets of signals drowning each other out... Electromagnetic waves bounce off of (or bent by) obstacles, like walls, which create eddies. Interference can cause lag, lost data, less range, lower signal strength, and dead zones, which makes it particularly hard to diagnose. While interference can happen with any network, WiFi uses longer-range, higher power signals than ZigBee or Z-Wave, therefore all-else-equal will have more interference. Device placement within the topography of a home can also affect interference. Home automation devices tend to be scattered haphazardly, which logically would result in more interference, and also makes it more likely for one to be in a dead zone.
[Note: #1 only applies with numerous devices, probably 50+. #2 applies for every device, but probably won't be noticible except with numerous devices. However, if planning whole-home automation, it's best not to get too deep if you're going to need that many devices, which isn't hard to do.]
3 - ZigBee and Z-Wave are as secure as possible short of using candles, since they have a limited command structure. Although an attacker could (hypothetically) send a command like "turn off", they can't send an unexpected command, and there's far less potential for "malformed packets". ZigBee and Z-Wave devices are essentially unhackable.
4 - By combining home automation with internet devices, they essentially share security risks. The types of exploits used for a smartphone are different than those used for a thermostat or a Hue.[*] High value targets like computers put smart home products at risk - and often unsecure smart home products put computers at risk. And smart home products that use apps... are both. It would be best to separate devices that require internet from that don't to separate networks (with the latter not connected to the internet) - see #6 and #7.
[* The Hue bridge uses ethernet, but the security implications are the same. Not to be confused with Hue bulbs which use ZigBee - the bulbs are secure, the bridge has had security vulnerabilities.]
5 - Despite "mesh WiFi" routers being a thing, WiFi is not mesh. ZigBee and Z-Wave devices act as repeaters. In general, more devices will cause a WiFi network to get worse and decrease range. In general, Z-Wave and ZigBee networks get stronger and increase range.
6 - WiFi [usually has a limit of 50 devices (credit to /u/Ksevio for confirming this)] has a hard limit of 255 devices, often far less depending on the router (see #1). That's comparable to ZigBee and Z-Wave controllers, but if you reach the device limit (or if #1), bridging multiple WiFi networks can be pretty difficult. However, it's typically easy to bridge multiple ZigBee and Z-Wave networks. Indeed, ZigBee has a theoretical maximum of ~15 million devices, so it's not bridging networks, it's essentially connecting two controllers to one network. (Z-Wave has a maximum of 255 devices per network.)
7 - While many people cite price as a reason to use WiFi, the reverse can be the true. While WiFi devices can be bought on the cheap, comparing brand-to-brand prices are equivalent (eg comparing Hue to LifX, or Sengled to Gledopto). More to the point, (if #1, #4, or #6) a decent WiFi router range from $200 to $400. Even if you already have quality router, that cost can't be ignored because #1, #4, and #6. A ZigBee or Z-Wave "router" (ie SmartThings, Hubitat Elevation, hass, Hue hub, etc.) range from $75 to $150.
8 - WiFi devices are often harder to install. This ranges from YAH (Yet Another Hub) to YAA (Yet Another App) to entering the WiFi password to setting a dedicated IP. If you have decent security practices, it becomes yet more difficult with the potential for setting up port forwarding, adding a firewall rule, and/or excluding the device from internet access. While that can apply to Z-Wave and ZigBee, it would only be for the hub/bridge (like the Hue hub, rather than an individual LifX bulb). See #3.
9 - WiFi devices can have hidden maintenance headaches should you need to change the network name, password, and/or router IP. Additionally, devices many [may] require being reset or reconnected if the internet router is changed, even for an identical model. Specifically, my Hue hub required a factory reset. Z-Wave can have a similar - but far more limited - issue where either the radio needs to replicate the network id, or devices need to be "excluded".
10 - Using (and/or integrating) WiFi devices can also be difficult (or outright impossible) with apps, custom drivers, or gawd forbid 3rd party cloud servers going through IFTTT to a 5th party cloud server.
11 - WiFi devices will often be exposed to anyone on the WiFi network just by downloading an app, so after having a few too many, Uncle Ralph could think turning the lights and sprinklers on and off is a real hoot. This is easy to get around, by having a "guest password", but it's not something most people do.
12 - Finally, it's easier to switch control platforms with ZigBee or Z-Wave devices such as from Hubitat Elevation to Home Assistant. Although it can be very difficult [to port a lot of devices and automation rules] at worst it's a repetition of having added them to begin with. The equivalent for WiFi of switching from Windows to Apple or from Android to iOS would most likely be impossible. While most people don't switch, home automation - while never future proof - should be built for the long term. Will your 38 Android apps for the Chinese sensors, switches, lights, etc., still be able to run in 15 years?