There are only 2 possibilities : either an OS issue, either a hardware issue. I have a 6S and started having same issues since iOS 10.3.1 update. It just won't connect to my wifi network anymore. I tried every recommendation (reset network settings, re-install iOS from iTunes etc.. no way, doesn't work). Then i wondered why it was connecting everywhere without issue, just issue at home (while i have 4 other Apple devices and they all work fine at home!!!). This meant no hardware issue, nore an iOS issue as i completely restored. I tried one thing that worked ! First you need to make sure you have a PIN code set up on you SIM card (you will understand later why i am asking this). First restart you iPhone, when it prompt to unlock your SIM, don't do it, just ignore. Then try to connect to wifi network --> guess what? It worked straight away. Then i enabled plane mode and disabled it again so my phone asks again to unlock the SIM.
I documented myself on the net and found out that sometimes there might be conflict between the 3/4G antenna and the wifi one inside the phone, specially when the wifi you have at home is settled on a certain "channel" (a wifi network broadcasts on different channel from 1 to 11 i think, this is normally automatic but can also be set up manually)
To be sure that my theory is real and works, i restarted again my phone but this time uncooked the sim before it connect to wifi : guess what? BANG BANG, doesn't connect !