Well you can try a few things.
First try restarting the tablet in "Safe Mode" and see if it will allow WiFi access in there. If you can access WiFi while in "Safe Mode" then there is an app, virus or malware on your tablet that is the cause of it not working correctly.
If that is the case you will either have to remove the problem app, scan and remove any viruses or malware from the device or do a "Hard Reset" to reset the tablet to its original state, before you used it.
Now, if it won't even allow access to WiFi in "Safe Mode" then there could be a hardware issue with the tablet. The only options then are either a repair (which could be costly) or get a new tablet.
Should you choose to do the "Hard Reset", the instructions are below.
NOTE: Doing this will clear 'all' the data on your tablet, so it is suggested you not choose this option unless you have to, or aren't worried about losing anything on the device.
Be sure you back up any data you want to keep, to a computer or cloud account, before doing the reset.
To "Hard Reset" the tablet...
1. Make sure that the tablet is actually powered off.
2. Remove your SD card, if there is one in the device.
3. Press the "Power" and the "Volume Up" buttons, together, until you see the start-up logo on the screen.
4. Once you can see the logo, release the buttons and allow the device to enter the "System Recovery Mode".
5. Next use "Volume Down" button to get to the "wipe data/factory reset" option.
6. When in recovery mode the "Volume Up" and "Volume Down" buttons are how to can navigate and highlight what option you need.
7. Once you have selected the "wipe data/factory reset", press the "Power" button to select that option.
8. On the following screen, repeatedly press the "Volume Down" button until the "Yes - delete all user data" option is what is selected.
9. Then press the "Power" button to hard reset the tablet.
10. If you took your SD card out in step 2, when the device is up and running again, reinsert the SD card.