Jason Heyward had three hits as St. Louis improved its major league-leading record to 78-45 and averted getting swept for the first time this season.
Wacha (15-4) picked up his fourth straight win and added to his career-best win total by allowing just one run on four hits. He struck out three and walked two.
After being shut out on Saturday night, the Cardinals scored four in the first against rookie Colin Rea, who was making his third major-league start.
San Diego made two errors in the first inning and the Cardinals capitalized with three hits, including Piscotty's two-run triple.
Rea (2-1) struggled early and made a throwing error in the first that contributed to the Cardinals' rally. The 25-year-old Rea gave up five runs - four earned - over four innings. He struck out four and walked two.
The Cardinals scored three runs in the seventh against Odrisamer Despaigne. Heyward tripled home a run and Piscotty hit a solo shot to left.
Piscotty, who had been hitless in 10 at-bats coming into the game, hit a two-run shot against Craig Kimbrel in the ninth for Piscotty's fourth career multi-homer game.
Justin Upton had two hits for the Padres, who had won five straight.
Matt Kemp went 0 for 4 with a strikeout and had his 14-game hitting streak snapped.
Padres: C Derek Norris is day-to-day with a left wrist contusion after X-rays following Saturday night's game were negative.
Cardinals: RHP Lance Lynn (9-8, 2.94) will take the mound in the series opener in Arizona on Monday, looking to reach 10 wins for the fourth straight season. The D-Backs counter with LHP Robbie Ray (2-9, 3.38).
Padres: RHP James Shields (9-5, 3.74) opens the series on Tuesday in Washington going for a second straight win. Shields shut out the Braves over six innings in his last start. Washington will counter with RHP Stephen Strasburg (7-6, 4.22).
Link to box score: St. Louis (78-45) 10 at San Diego (61-63) 3