The score was tied 2-2 early in the final period when Carl Hagelin intercepted a pass in the Panthers' zone and found Richards in the right circle, who sent a wrist shot past Tim Thomas.
New York made it 4-2 less than 6 minutes later when Richards fed Mats Zuccarello for a one-timer from the left side during a power play.
Derek Dorsett and J.T. Miller also scored for the Rangers, who won for the sixth time in seven games.
Henrik Lundqvist stopped 24-of-27 shots.
Brian Campbell notched a pair of goals and Aleksander Barkov also scored for the reeling Panthers.
Thomas finished with 25 saves.