I hate to tell you this, but...this started happening to my first iPhone 6. Various things helped sometimes, sometimes they didn't. I tried: powering the phone off and back on, doing a hard reset, resetting network settings, resetting all settings. The issue got progressively worse over the course of 3 months or so, ie it would take 2 or 3 things to get the wifi toggle switch functional again. In the end, nothing worked at all and the bluetooth also stopped functioning. Restoring the phone to factory did not help and the phone had to be replaced. It turned out to be a hardware issue. Apple did make me go through ALL of the troubleshooting steps available before finally agreeing to replace the phone. The phone was less than 4 months old when this started.
I would advise you to consult Apple, you probably need a new phone. Oh...back up your phone to iTunes ASAP.