iPhone Wi-Fi could not connect
There are a lot of possible things here that could cause your problem. 

1)The Wi-Fi receiver on your iPhone could be faulty. You will have to take it to an Apple Store to get that fixed. 

2)Your modem might have connection problems. Try pulling out the power cord and wait 5 minutes. While you're waiting, make sure all the cables are fit into the modem and not loose and hanging out.