0.4mm pitch BGA pads
At 0.5mm pitch and larger, we generally recommend non-solder mask defined (NSMD) pads for BGAs. The NSMD pad will allow for better adhesion with the solder being able to grip the sides of the copper in addition to the top surface. Even down to 0.5mm pitch BGAs, most part manufacturers still say to go with NSMD pads. Granted, you need to make sure your fab house can do a good job of mask registration. It's no good to have pads that are half SMD and half NSMD. We've seen that.
Once you go down to 0.4mm pitch BGAs, though, things get different. We're starting to see more and more of these. Some CSP (chip scale package) or WSP (wafer scale package) BGA and LGA parts are starting to show up in 0.4mm pitch, as well as some bigger parts like the Ti OMAP processor.
At that size, you start to see more risk of solder bridging with NSMD pads, as in the left side of the illustration below.
This is a somewhat exaggerated view, but it shows the potential problem here. With such small geometries, you probably aren't going to be able to route escape traces on the top layer either. You'll have to put blind vias in the pads and escape through the inner layers. By the way - NO OPEN VIAS IN PADS. The pad needs to be solid metal with such a part. No exceptions. Don't try using solder mask to cap the vias at this pitch either. Plate over it. It has to be all metal.
You can finds some more detail here in a design guide written by Ti for their OMAP processor. Pages 8 through 12 talk about pads, mask and vias. Obviously, you should consult similar materials written specifically for the part you are using, but Ti did a great job of covering all the issues here so I use it as a good general piece.
Are you there Moles? It's Edgar.