As with so many tool selection questions, a good place to start would be to ask yourself what you want to do with it.
If you have a specific need in mind, then choose the tool that's better for that. For example, if you plan to build a whole kitchen's worth of cabinets, the table saw is probably what you want. If you're interested in making bandsaw boxes, well...
The short version: a table saw does a handful of jobs better than anything else, while a bandsaw is extremely versatile.
A table saw is pretty much the archetypal woodworking power tool, and as a result, it tends to be the first tool many people buy when setting up their workshop. It was certainly the first tool I bought, for pretty much that reason. It's also the power tool that I use least often. If you don't have a specific need that you're trying to fill, and just want something for general woodworking use, I'd recommend a bandsaw.
Of these two tools, there are some tasks that a table saw does better than any other tool. Cutting (reasonably sized) sheet goods is one example. Making repeatable cuts on a lot of case parts is another example.
There are also a lot of tasks that table saws aren't suitable for. You should never try to make curved cuts on a table saw.
A bandsaw can do a lot of things competently, and some things really well. If you have any type of curved profile you want to apply to a piece along its length, a bandsaw is the best tool for this. If you need to resaw stock, a band saw is the best tool for this.1 If you need to make rip cuts on stock that doesn't have an absolutely flat, square edge on it yet, the bandsaw is much safer.2
And while there are safety concerns associated with any power tool, the risk of kickback is, in my mind, the biggest safety concern when using a table saw. Because the working portion of a table saw blade is moving toward you with a lot of energy, if the work piece binds in the cut, or if your technique is poor, a table saw can throw the work piece back at you, potentially causing serious injury. Because of the way a bandsaw blade moves toward the table, it can't throw the work piece in this way.3
In my particular usage, one of my bandsaw's greatest strength is its versatility. Very, very often when I'm in my shop, I'll have to make some quick and dirty cut on whatever I have in hand, just to get it to approximate size or whatever. Most of the time, I can just walk up to my bandsaw and get it done in 15 seconds, where if I were going to use my table saw for the same job, I'd have to worry about fixturing, flatness of the reference surface, etc.
1It is possible to resaw with a table saw, but the process is tedious, and you lose a lot more material thickness this way.
2Although you can build a jig to accomplish this on a table saw, too.
3Regardless of which of these you choose, please make sure you understand the safety considerations of the tool, and learn how to use it safely.