Both good guns and I've owned both. Pluses and Minuses for both guns.
M & P 45
Positives
Fits smaller hands better
Extended 13 round mags are available
Crappy stock trigger still groups pretty good
Better stock sights than Glock
Available with 1911 style thumb safety.
Reliable and Accurate
Negatives
Mags are not as good of quality and fit and finish is poor (of magazines), the wraparounds on the extended mag fit is of laughable quality. And they cost more.
Crappy Trigger hurts quality feel of gun when shooting
Available with 1911 style thumb safety
Overall fit and finish is a notch below the Glock.
Accesscories cost more money because the aftermarket is not as Competitive.
Glock 21
Positives
Better stock trigger
Stock mags hold three more rounds and are cheaper
Stock mags fit three other guns as concealable options on same platorm.
Seems to have a little less recoil.
Aftermarket accessories are a much more competitive.
Gen 4 grip texture is great for non-slip in a variety of conditions.
It's a Glock, it works and hits what you point it at.
Negatives
This is gun for bigger hands, even the smallest grip option is on the big side
Stock sights (like all glocks) are poor.
Seems to sell for about $100 more new