I will preface this by stating that I am an adamant Yankee hater, but I will attempt to be as impartial as possible.
Mattingly was a good player, and was one of the best for three years in the mid-'80s, but he didn't really have an outstanding HOF career - particularly for a 1st baseman. He was great for a few years, pretty good for another few years and then rather ordinary for several other seasons.
A 1st baseman who hit .307/.358/.471 (127 OPS+) with 2153 hits and 222 HR in 13+ years shouldn't be much of a candidate for Cooperstown.
When he retired his Most Similar player at 34 was Steve Garvey. In general, the Most Similar comparison according to Baseball Reference is Cecil Cooper, who hit .298/.337/.466 (121 OPS+) with 2192 hits and 241 HR. Other players on the list - Wally Joyner, Hal McRae, Kirby Puckett, John Olerud, Will Clark, Tony Oliva, Keith Hernandez, Jim Bottomley and Carl Furillo.
Only two are in the HOF - the aforementioned Puckett and Bottomley. Kirby got in because of his charisma, his postseason heroics and the fact that he was the premier CF in the game for a decade. Bottomley was a 1B in the '20s and '30s and the 1928 NL MVP, inducted by the Veterans Committee in 1974.
Out of all those similar 1B on the list, no others but one old-timer VC selection are in the HOF, so why should Mattingly go in?
If John Olerud retired tomorrow, he'd end up with a career line of .295/.399/.465 (130 OPS+), 2189 hits, 248 HR, and 1193 RBI. What makes Mattingly's career significantly stand out from what Olerud has done?
It's questions and topics like these that make me think we should have a HOF for the Very Good. Take what you want from that, but I believe the Hall should be an extremely exclusive club honoring only the best.
"Mr. Mattingly, please follow me to this roped off area. Keith Hernandez, John Olerud, Steve Garvey, Will Clark and Mark Grace are all waiting for you. Maybe we can find a dusty little corner in Cooperstown to honor you all together - if we could ever figure out who was who."