I have used the Sturmey-Archer X-RD3 hub on my own bikes for a number of years now and am also one of several mechanics servicing a fleet equipped with Shimano Nexus 3R-40 hubs with roller brakes. These two hubs are more similar than different, and choosing one over the other shouldn't be a major decision. On the other hand, for more technically minded people or those who do most of their own mechanical work, the differences are worth noting. I have very little experience with the 3-speed offerings from SRAM, and since none of them include a drum brake I won't offer any opinion here.
These are both internally geared three-speed hubs with an attached drum brake. Shimano calls it a roller brake, though it is functionally a drum brake. The gear range is nearly identical. It will make more difference changing the cog used by one tooth than picking one hub over the other, so this is a non-issue. In both cases the middle, or neutral gear, is the same as the chainring/cog combination.
Three-speed hubs have been around since the beginning of the 20th century. The design is well understood, durable, and very low maintenance. Most would point to the mid-century Sturmey-Archer AW hub as the pinnacle of this type of hub. The internals were well sealed from the elements, very simple, and the machining and metallurgy were extremely high quality for the price. The modern hubs may not last the decades that the older hubs did, but the shifting is much improved and they remain low maintenance.
This is one area where the two hubs diverge. Sturmey-Archer offers a classic trigger shifter (similar to those found on countless old Raleighs), as well as a more modern bar-end shifter, thumb shifter, grip shifter, and button shifter. Though Shimano only offers a grip shifter, it is certainly a more effortless shift, and is more durable than most grip shifters (certainly better than the Sturmey). This may be one of the areas that cause someone to choose one the of hubs over the other.
Shimano uses a small unit on the end of the axle (called a bell crank) that provides visual cues for adjusting shifting. This bell crank will be removed when removing the wheel from the frame, but the shifting adjustment is retained so that shifting is perfect upon reinstallation. Sturmey uses an indicator chain coming out the axle. Shifting is adjusted by lining up the shoulder on the chain with the end of the axle. In order to remove the wheel, this needs to be disconnected from the shift cable (via tool-less disconnect system) and readjusted upon reinstallation of the wheel. It is a straightforward process but can be made much more difficult with dirt buildup at the end of the axle or poor lighting. The Shimano is really much better designed in this regard.
The drum brakes offer many of the advantages of disc brakes without the maintenance of truing disc rotors or lining up the caliper. The brakes perform nearly identically in wet and dry conditions, and a rim that is out of true has no effect on braking performance. They are generally less powerful than rim or disc brakes, but only slightly. One thing that may be viewed as a negative is that drum brakes require an extra step to remove the wheel from the frame and these hubs do not come in a quick release version. The last few flats I've changed, I've merely left the wheel installed and removed enough of the tube to find the hole and patch it.
I am unable to make my tires skid with the Sturmey-Archer hubs, but they stop very quickly nonetheless. I have never felt the need for more braking power, even during panic stops. The braking performance of the Sturmey-Archer hubs has remained constant through the 4 years I've owned them. The pads are very thick and will likely outlast the bikes the hubs are installed on (bikes that are already 40 years old).
The Shimano Roller brakes will cause the rear wheel to skid (at least on the 26x1.95 tires we use) but the performance will deteriorate over time. The brakes last about 1-2 years on bikes that are used more than any one person could use them. I would expect them to last 3-4 years for most people. If the bikes experience a lot of rain, the grease will get washed out the brake and the brake may be too strong, causing the wheel to lock up with very little force on the brake lever. Shimano sells roller brake grease that can be applied via a special port on the brake body to solve this. This would need to be applied once or twice a year under normal riding conditions. It is fairly easy to tell when the Shimano brakes are worn out. Putting the bike in a repair stand, adjust the brake cable tension properly so the brake is not engaged but starts to slow the wheel with very little force on the lever (a few mm of lever travel). Now, when you test ride the bike, the lever will require quite a bit of travel before any apreciable braking power is felt and it will be difficult or impossible to lock up the wheel.
Shimano sells various versions of the roller brake that will all fit the Nexus 3R-40 hub. More expensive versions come with larger heat sinks to dissipate heat buildup. I am not sure if these offer more powerful or more durable braking.
I have overhauled these hubs countless times, not always because they needed it, but mostly to satisfy my own curiosity. Making sure I know how all the parts work so that I can diagnose the problem without opening the hub and trying different lubricants to see how well they work. These hubs tend to fail slowly. It will become apparent through riding, especially in the 1st and 3rd gears (the indirect drive gears), that some play has developed in the mechanism. In the Sturmey-Archer you can start to feel the engagement between the axle and the planetary gears which is not evident in a new hub. On the Shimano the pedals will offer reduced resistance (like slipping in slow motion) for 1/8 of a pedal revolution after shifting into 1st and 3rd gears before settling in and feeling normal. Like the Sturmey, this is due to the wear between the axle and the planetary gear.
Shimano only offers a replacement of the complete internals (including drive side cone and bearings), while Sturmey offers a replacement axle kit which includes planetary gears (costing around half as much as the Shimano complete internal replacement) but not the drive side cones or bearings.
The Shimano hub is easy to service, requiring no special tools (standard cone wrenches are enough) and is something that could be done by an advanced home mechanic. The drive side bearings are not sealed very well being covered by one rubber seal. Regreasing these bearing should be done at least once a year, more in wet conditions, and can be done by anyone familiar with basic hub adjustment.
When lubricating the internals, I've been using a combination of Park Tool grease and Phil Wood Tenacious Oil. The resulting mixture is thick enough not seep through the rubber/plastic seals on the Shimano Hubs. In my opinion, the Shimano Internal Hub Oil is far too thin to be kept in by the snap-on seals and is better suited to their 7 and 8 speed hubs that have thread-on seals.
The roller brake unit will need to be removed for most spoke cases of spoke replacement. We have found that most spoke breakages occur on the drum brake side of the hub. This is very easy to do and doesn't require readjusting the bearings during reinstallation. With the use of a cone wrench the proper angle of the roller brake arm can be set once the wheel is already placed in the dropouts, a huge timesaver over the Sturmey-Archer system.
While being better sealed, the Sturmey-Archer hub is much more difficult to disassemble and reassemble though the internals themselves are relatively simple. Removing the internals requires a special tool (or modifying a pair of channel-lock pliers as I've done). Reassembly may require some trial and error correctly aligning the drum brake arms relative to the axle flats based on the angle of the bikes dropouts. Because of the odd shape of one of the exterior nuts (round with two small notches opposite each other) and the cramped space trying to maneuver a tool between the exposed brake arms it can be frustratingly difficult to get proper bearing adjustment while also maintaining good brake arm position.
The drum brake unit is part of the hub shell and separated from the rest of the internals by a circular plate that is spot-welded in three places, the rest of the gap has been filled with a bead of silicone sealant. It is best to use a thicker grease lubricant (no oil) on the internals so it doesn't seep through to the drum brake. Any lubricant in the Sturmey drum brake area will cause braking to deteriorate dramatically. The drive side bearings are covered by a labyrinth seal which does a very good job of keeping water out. The freewheel bearing retainer is more exposed and can be accessed by removing the cog and the bearing shield. I would remove this shield and add a layer of grease to the exposed retainer every few months in wet weather (similar to the Shimano hub).
The Shimano hub is so much easier to adjust and work on I really thought it would make up for the shortcomings of their brakes. But having a brake that can be inconsistent over time is a real deal breaker. Especially one that fails perhaps too slowly for most people to realize until they really need it.
If the Sturmey-Archer hub was a little easier to adjust (by adding normal wrench flats to the ball ring on the drive side and the small nut/spacer on the brake side) it would be a hands down winner by virtue of the more consistent braking and myriad of shifter options.