Hammel (6-10) snapped a two-start losing streak as he gave up just two runs on five hits with three walks and five strikeouts.
"Knowing that I was throwing strikes on the inside of the plate kept them honest out there," said Hammel. "It's all about placement in this game cause it's what you have to do in the league to stay successful."
Troy Tulowitzki went 2-for-4 with a run scored while Ian Stewart and Chris Iannetta each drove in a run for the Rockies, who have won their past two.
Tim Stauffer (6-8) dropped his second straight start as he was touched for all three runs on eight hits with a walk and three strikeouts over seven innings.
"There was a combination of things out there tonight," said Stauffer. "We played a good game out there, but they took better advantage of their chances."
Orlando Hudson went 2-for-4 with an RBI and a run scored while Cameron Maybin was 3-for-5 with a run scored for the Padres, who have dropped three of four.
Colorado jumped on top in the second inning. Tulowitzki and Seth Smith each singled to start the inning and moved up a base on a Mark Ellis groundout. Stewart then singled home Tulowitzki and Iannetta followed with a single to plate Smith. After a double-steal, Stauffer was called for a balk that allowed Stewart to score for a 3-0 lead.
The Padres got on the board in the third. With one out, Cameron Maybin doubled and moved to third on a wild pitch. An infield single from Orlando Hudson plated Maybin. After Hudson stole second, Chase Headley punched a single to right to make it a 3-2 game.
The Padres left runners on first and third in the fifth then threatened again in the seventh. With one out, Kyle Blanks worked a walk and Hammel stepped aside for Matt Lindstrom, who struck out Maybin but allowed Hudson to reach base with a single.
Matt Reynolds then took the mound and walked Headley to load the bases before Matt Belisle stepped out of the bullpen and induced a pop out from Ryan Ludwick to end the inning.
Rafael Betancourt worked a 1-2-3 eighth inning while Huston Street rebounded from a two-out double by Maybin in the ninth by getting Hudson to groundout for his 28th save of the season.
Before the game, the Padres announced that pitcher Clayton Richard will miss the rest of the season as he had arthroscopic surgery on Friday...Colorado has taken six of 10 from the Padres this season...The Padres left nine men on base...Stauffer fell to 3-3 in nine career games against the Rockies...Hammel improved to 4-2 lifetime against San Diego.