The Giants maintained a nine-game lead over the Los Angeles Dodgers in the National League West with both teams having 13 games remaining.
San Francisco's first three batters scored in the opening inning off Tyler Chatwood (4-5), who lasted just four innings in taking the loss.
Angel Pagan singled to open the inning, Marco Scutaro doubled and Sandoval then hit his homer to right.
Brandon Belt also contributed a two-run double during San Francisco's three-run fifth.
Matt Cain (15-5) coasted to the win, giving up a run on four hits with eight strikeouts over eight innings.
Colorado has dropped five in a row and lost for the 90th time this season.
Aaron Carter is still in love with Hilary Duff
NBC reportedly holds celebs hostage to Jimmy Fallon's show