Stafford gave Buffalo a 2-1 advantage with 6:27 to go in the second period and closed out the scoring with 3:51 to go in the third. He has reached 17 goals for the season.
Buffalo has won three in a row and improved to 5-0-2 in its last seven outings. The Sabres moved into a tie with Washington for eighth place in the Eastern Conference.
New York has already wrapped up a playoff berth.
Travis Turnbull and Tyler Ennis scored for the Sabres. It was the first NHL goal of Turnbull's career.
Ryan Miller picked up the victory with 26 saves, giving up only a goal to Bryan Boyle in the second period that created a 1-1 tie.
Henrik Lundqvist stopped 22-of-26 shots for the Rangers. New York lost forward Mats Zuccarello to a fractured wrist in the opening period.
Notable deaths of 2014 [PHOTOS]