VROOT - Galaxy Tab 4 7.0 only
For the Galaxy Tab 4 7.0 models there is currently one root method reported to work, it's a bit more complicated in that you have to go through extra steps to use your preferred SU app instead of the one that's included in the root method.
If you are interested the method is VROOT and here is a thread by ShinySide which explains how to use it:
The search continues for a better root method and you can check this thread for more info, If/when a better root is obtained I will update this post with the info.
Galaxy Tab 4 8.0 & 10.1 root methods
For the Galaxy Tab 8.0 and 10.1 models there are currently 2 root methods available. The first one that came out was the popular CF-Auto-Root by Chainfire and more recently is Towelroot by Geohot. Please support these devs by donating to them and/or buying their apps.
I'm listing Towelroot first because:
1. I've personally tested it and verified it works on my own Galaxy Tab 4 8.0 WiFi (SM-T330NU)
2. It seems to be easier (it was very easy)
3. It does not seem to trip the KNOX counter (did not for me in any case)
There is a new root method developed by Geohot called Towelroot.
Originally designed for the AT&T & Verizon Galaxy S5 and Note 3 it seems that this root method works on many other phones and devices. From what I understand it should work on most KitKat devices with a Kernel dated before 03 June 2014.
What this means is that even if you don't want to root right now but you want the option to root later you should not take an OTA update for your tablet unless you've verified that you can still root post-update. Likewise if you are rooted (no matter what method) it's recommended that you never take an OTA update because you should always assume that root will be lost (and may not be obtainable again) and in some extreme cases taking an OTA on a rooted device can brick your device.
I used Towelroot on my Galaxy Tab 4 8.0 WiFi (SM-T330NU) and it worked like a charm.
Here's the thread with more information which also includes Geohot's PayPal information.
Chainfire has released CF-Auto-Root for the Galaxy Tab 4 8.0 and Galaxy Tab 4 10.1
The files and instructions for how to use them are located on his site:
Please make sure you read all the disclaimers and warnings on his site and make sure you get the correct Auto-Root for your device.
SM-T330 - Galaxy Tab 4 8.0 WiFi
SM-T330NU - Galaxy Tab 4 8.0 WiFi
SM-T331 - Galaxy Tab 4 8.0 3G (HSPA)
SM-T335 - Galaxy Tab 4 8.0 LTE
SM-T337T - Galaxy Tab 4 8.0 T-Mobile
SM-T530 - Galaxy Tab 4 10.1 WiFi
SM-T530NU - Galaxy Tab 4 10.1 WiFi
SM-T531 - Galaxy Tab 4 10.1 3G (HSPA)
SM-T535 - Galaxy Tab 4 10.1 LTE
I don't know what the difference is between the Tx30 and Tx30NU, just make sure you get the correct one for your tablet model.
If you have a carrier-specific version (if you got your tablet from AT&T for example) you may (probably do) have a different model number and you should triple check to make sure your model matches before attempting to use any of these files.
Your model number might be visible on a sticker on the back of the tablet (it was for me) but in any case you should be able to find it in Settings - General - About Device.
Hope this was helpful, all credit for these root methods goes tot he creators of the methods.