You should only activate your Wi-Fi (WLAN) when you really need it. For example, when you want to connect to your home network. Switch it off when you're out and about.
More information
When your smartphone connects to Wi-Fi networks or simply actively searches for Wi-Fi networks, it sends out so-called probe requests. This information is often unique and can be used to recognize you or even track you.
In the most extreme cases, even your home address can be determined. On websites such as wigle.net, you can easily search for the physical locations of Wi-Fi networks. Google and Apple use their market power to store the locations of neighboring Wi-Fis through their devices in their own databases. Do you operate your own Wi-Fi? Google and Apple are very likely to know its coordinates. Simply because other people walk past it with their smartphones.
Many stores also use this technology to track the exact routes taken by customers in the store. Well-known providers of this tracking technology for stores include Telefonica and 42reports.