Wi-Fi radio signals are divided into bands and channels. Most HomeKit devices operate on the 2.4GHz band, and there are essentially only three non-overlapping channels available to you on 2.4GHz: 1,6, and 11. With only three clean channels available, it is highly likely that you will have a lot of potential interference from neighboring Wi-Fi networks if you live in a city or an apartment building. Use a Wi-Fi scanning app such as WiFi Explorer or WiFi Explorer Lite (free) to scan your environment and configure your Wi-Fi to use the least congested channel available.
Many home Wi-Fi systems will offer an "auto" mode to automatically change the Wi-Fi channel for you. They are supposed to automatically change to the cleanest channel for you. Changing the Wi-Fi channels can affect the reliability of your HomeKit devices to stay connected to Wi-Fi. Personally, I turn the auto-channel option off and set my channels manually.
Wi-Fi "Smart" Features
Many home Wi-Fi systems have features that are supposed to "improve" your home network. More often than not, these features can do more harm than good. Often times these features are used for marketing to set their routers apart from their competitors. These features go by many names: Beam Forming, Band Steering, Game Mode, Air Time Fairness, Air Time Quality, MIMO, auto-whatever, etc. I recommend you turn most of these features off. You may need to do some research to see what a feature is, and whether it should be turned off or not. Generally speaking, I try to run a network that is clean and simple, and turn off any "fancy" features that are trying to bend and twist Wi-Fi devices into doing something they wouldn't otherwise do. Here is an article written by John Lian that gives similar advice: Get reliable connection with your HomeKit devices.
Another reason you want to turn these auto/dynamic and smart features off is for (network) consistency. For consistency in your network experience and consistency when troubleshooting, you don't want your environment to change if you can avoid it. Every change (band, channel, addresses, software and firmware updates, new devices, offline devices, etc) can potentially change a well-working HomeKit environment into an unpredictable, frustrating mess. Get your network running stable, and avoid changes when you can to keep it that way.
But My Wi-Fi Coverage Is Good
One of the things that people fail to realize is that a laptop that connects well in the living room for browsing reddit and amazon does not equate to a smart plug working reliably well in the same room.
First of all, laptops have much larger and more powerful antennas than SmartHome devices (they also probably have more robust Wi-Fi software drivers). But more importantly is how communications are handled. When the web browser on your laptop encounters an error when requesting data from a website, it asks the server to send it again. Due to the nature of web browsing and how web pages load, you may not even noticed the number of errors on your connection. But when you ask a light to turn on and it takes two seconds, you will really notice that.
Some Things You May Not Know About Wi-Fi
I mentioned at the beginning that the 2.4GHz band only provides three non-overlapping channels. Make sure your home network is on the cleanest channel(s)!
It is the software and hardware on the client (in other words, your computer, or phone, or iPad, or smart device), not the access point, that determines how it connects to Wi-Fi.
Another thing to be aware of is that (prior to the newly-released Wi-Fi 6 specification) only one device can talk to a Wi-Fi radio at a time. Period. All of the MIMO features and other marketing mumbo jumbo that implies a Wi-Fi router is handling more than one connection at a time is baloney. A way to really picture this is to imagine placing a single chair in the middle of the room. Now fill that room with 20 people. Now imagine that the only person that can talk is the person sitting in the chair. Now imagine that in order to sit in the chair you have to ask for permission and receive permission first. Now imagine that permission to sit in the chair isn't given until the current person is done talking. Now have the 20 people in the room discuss politics. That's how Wi-Fi works. All that being said, Wi-Fi access points change "who is sitting in the chair" very, very, very, quickly. But it is still only one device at a time. This is why it is important when looking at mesh Wi-Fi systems to either connect the backhaul using Ethernet or pick a system that has a dedicated radio for the backhaul communications.
Many consumer grade Wi-Fi systems cannot handle more than 50 connected devices at a time, and their performance falls as more devices connect. Now think about how many smart switches and outlets you might have in your home. Thinking of that, read the Bridges vs Wi-Fi section to learn why bridged-HomeKit gear is a good thing (contrary to what you may have heard in online forums).
Apple's Advice on Configuring Wi-Fi: https://support.apple.com/en-us/HT202068