Thanks for the question, and welcome to Apple Support Communities.
The following article includes troubleshooting steps for your issue:
Follow these steps to resolve the issue:
1. Verify that airplane mode is off by tapping Settings > Airplane Mode.
2. Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
Note: This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings
3. Ensure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
4. If your issue is still unresolved, perform a software restore in iTunes.
If you are still unable to turn Wi-Fi on, please contact Apple for support and service options.
This is definitely NOT a hardware fault. Too many users upgrading to iOS 6.1.3 and above are experiencing the same issues, i am one of them. Just come from the Apple store and they admit that the OS is the culprit and are hoping that the release of iOS 7 will fix the issue. They have been told by Apple to just replace the phone to customers experiencing this issue as it is just too hard at the moment to rectify so many hand helds. I can't understand why Apple have continued to put their head in the sand for so long and just ignore the problem.
Hopefully iOS 7 does in fact rectify this wi-fi error that their software has created.