I have a large fencing project and I'm thinking about purchasing this nail gun:
RIDGID 2-1/8 in. 18-Gauge Brad Nailer:
Would this be suitable for attaching pickets to the rails, or is there a better tool for this?
No -- an 18 ga. nailer is ideal for attaching small pieces of trim, like shoe molding/quarter round, inside your house. Outside, the nails will quickly rust and fall off -- they aren't galvanized, they are TINY, and they have little to no head on them. If you want to use a nailer, you need to use a framing nailer like Shirlock suggested. Make sure you use hot-dipped galvanized nails.
Personally, when building a fence, I use coated decking/exterior screws. They won't allow boards to warp and move like nails will, they absolutely won't ever rust unless you stripped the coating off somehow, and if you need to replace a fence plank because it cracked/warped/discolored, or you need to repair storm damage, or you need to remove an entire run of fencing to get a pickup truck or a large piece of equipment into the backyard, you can just unscrew a couple of screws. I haven't used nails for fencing in several years, and I've been happier as a result.
I think you will find that 18 gauge is way too light for your needs. I know that a lot of guys use finish nails for spindles and some light weight fencing, but I'm old school and prefer a headed galv nail, preferable threaded. At a minimum, I think you should use 16 gauge galv nails. Depending on the picket and rail dimensions, if meaty enough, I'd recommend a framer gun with 2" to 2 1/2" 4D galv ring shank nails. I guarantee these nails won't back out over time.