The iPhone 4S Wi-Fi failure is infamous. It is observed that it happens most often after a software update/restore or during abrupt changes in temperature.
Many things may have gone wrong, and you'll need a professional tech with the right tools and knowledge to diagnose the problem.
The most common cause though is a failure of the Wi-Fi chip, in which case you'd better sell the phone or get a new one.
Some people choose to re-heat the Wi-Fi chip in order to re-activate it temporarily. This solution puts you at risk of permanently disabling your phone and, as said, it is temporary at best.
In my honest opinion, don't spend money on it if you require Wi-Fi. Get a new phone.