It depends. If you plan on buying games the legit way either on disc or from the eshop then yes, 4GB is enough to mod the Wii U and loading basic homebrew. Even if you're going to mod the Wii U's Wii Mode at a later time, 4GB will still be enough. If on the other hand your plan is to obtain Wii U games the not-so-legal way you will need an SD Card with a size of at least 32GB. That's because as of this point in time, there are two ways to play your "backups" on the Wii U:
1. Using a homebrew loader called "loadiine", which can only read games from the SD Card as of now
2. Downloading the games from Nintendos servers using a PC, where you then need to put the game files on the SD Card to finally install them either to the Wii U's internal memory or an external usb drive. The games themselves are split up in several smaller .app files, but all of these smaller files need to be present on the SD Card during installation. Depending on the game, the overall filesize of a game can be 2-3 GB or as much as over 20 GB, so there's no way to fit that on a 4GB SD Card.
Another important thing to note is that in order to use an external usb hdd for Wii U games, the console will format the drive with a special filesystem that as of now can only be read and written to by the Wii U itself. So you can't store Wii U and Wii games on the same drive if that is something you wanted to do.
Hope this helps