Well it can be a few reasons. It could be that there are to many things on the WiFi. They could be trying to connect with the wrong info (bad passwords, etc.) The settings on the router/modem or the phone/tablet could be wrong. I could go on.
Try the following for both phones and tablets (the info is the same as long as both are Android)...
Try this to set up the device to access WiFi....
1. Go to "Settings" and the tap "WIRELESS & NETWORKS".
2. Next tap "Wi-Fi" and slide the "Wi-Fi switch" to the "ON" position.
3. The device should now automatically scan for Wi-Fi networks and display the available names.
4. If the device finds a network that you connected to previously, it will connect to it
automatically.
5. Now tap a network name to connect to it, and enter a password if necessary.
6. Also, if your Wi-Fi router supports "Wi-Fi Protected Setup", you can then tap the "WPS" icon at the top of the screen, and then press the "WPS button" on your router.
5. Should your network not broadcast its SSID, then tap the "Plus" icon ( + ) at the top of the screen, and enter the "Network SSID" (name) of the network. If necessary, you will also have to enter the security and/or other network configuration details.
Also try this...
I would make sure that there are no apps that were recently installed, or updated, that could be causing it to disconnect. Either through just messing with the connection (yes some are just made to annoy) or by trying to do things through the WiFi and it keeps kicking it out. So I would check the device.
If that isn't it, then sometimes you need to adjust the WiFi sleep policy on the tablet. It can often cause this.
To check to see if this is the issue...
1. On the home screen of your tablet go to "Menu" then "Applications".
2. Next go to "Settings" and finally "WiFi Settings".
3. On this screen tap the "Menu" button and then choose "Advanced".
4. Now you want to choose "WiFi Sleep Policy".
5. It should show you options, including one for when the screen turns off. If it is set to do this, then the WiFi will automatically be disabled, and go into "Standby Mode", as soon as the screen goes dark. Also there will be options like "Never When Plugged In", so that the WiFi will go down if you plug the tablet in. Go through each of the choices your device gives you in here, and make sure it is not set to turn it off for such reasons. You also have the option to set it to "Never" disconnect from the WiFi.
One of these should fix the problem. If none of the above work, try the following...
1. Try and restart the tablet. Sometimes it is that simple.
2. Update the firmware and any apps that need updating on the tablet.
3. If the problem persists, check your time and date on the tablet to make sure it is correct.
4. Should none of the former work...
a. Clear out the WiFi data on the tablet.
b. Reboot the modem/router.
c. Once the modem/router is fully 'up' again, reboot the tablet and re-input the WiFi data.
5. Now, if you are still having the problem at this point, and you are sure it isn't the modem/router that is the problem. Then you may wish to try a "Hard Reset" of the device. However, I really suggest saving this as a last option (or last before parts repair/replacement).
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. Press the "Power" and the "Volume Up" buttons, together, until you see the start-up logo on the screen.
3. Once you can see the logo, release the buttons and allow the device to enter the "System Recovery Mode".
4. Next use "Volume Down" button to get to the "wipe data/factory reset" option When in recovery mode the "Volume Up" and "Volume Down" buttons are how to can navigate and highlight what option you need.
5. Once you have selected the "wipe data/factory reset", press the "Power" button to select that option.
6. On the following screen, repeatedly press the "Volume Down" button until the "Yes - delete all user data" option is what is selected.
7. Then press the "Power" button to hard reset the tablet.