The hard way
I'll start with the hardware solutions. There are many bass amp emulators, both in rack and pedal format. And for all budgets!
The most fortunate among you might want to take a look at the heavyweights by Kemper and Line 6, which can also be used for electric guitar. I've had the opportunity to work with someone who used a Kemper and I must admit I was blown away by its quality.
If you are on a more modest budget, you'll probably have to make do with a pedal. While they certainly don't offer the same freedom when it comes to crafting a sound, some of them have nothing to envy the big shots. I'm thinking about the SansAmp products as well as my personal favorite: the Le Bass pedal by Two Notes Audio Engineering.
Apart from allowing you to record a bass line without the need of an amp, they can also come in very handy onstage and for rehearsals. So, if you are a bass player yourself, such an investment is certainly worth considering.
The soft way
Much more limited than that of its six-string cousins, the software offering for bass guitar is nevertheless pretty interesting. In terms of sound, I must admit that certain software makers have made great improvements lately. While the bass presets included in Native Instruments' Guitar Rig are clearly outdated, you can't say the same about the ones in Overloud's TH3 or IK Multimedia's Ampeg SVX 2. Personally, I have a weakness for the bass presets in Blue Cat's Destructor, which I use exclusively with the excellent speaker impulse responses of Two Notes Audio Engineering's Torpedo PI-101 WOS III. Armed with this you can't go wrong direct recording any bass!
The hybrid way
Between the all-hardware and all-software solutions there's a hybrid way to benefit from the best of both worlds. In fact, you can record the signal coming directly from a true bass amp…
Finally, do consider using something like the Two Notes Captor (no, I'm not a stockholder in the company!), before going into your audio interface or you risk finding out the hard way that it's more than it can handle. Afterwards, you can use the signal captured like that with any speaker emulation plug-in of your liking. This setup is perfect to capture your bass player's sound without disturbing your neighbors nor having to deal with the lousy acoustics of your room. What else could you ask for?
And before we call it a wrap for today, these are by no means last-resort options. Many top audio engineers resort to this technique more often than you'd think, even if the technical constraints they have are obviously smaller than the ones you and I face every day. So, if the quality thus obtained is enough for them, why the hell shouldn't it be for you or me?