Casteel, pinch-hitting for pitcher Franklin Morales, hit the offering from Patrick Corbin just over the wall in right for a 2-0 Colorado lead.
Morales, who is battling for a spot in the starting rotation, allowed just one hit over two scoreless innings.
"I feel good," Morales said. "I worked quickly with my pitches."
The left-hander did struggle a bit with his command, allowing two walks while striking out one. Of his 36 pitches, 21 were strikes.
Corbin, who could be in line to start the season opener for the D-backs on March 22 against the Dodgers in Sydney, allowed just four hits over four innings, with his only runs allowed coming on the homer.
The Rockies increased their advantage in the fifth, when leadoff batter Brandon Barnes reached second on an error by center fielder A.J. Pollock. One out later, Charlie Culberson doubled off the wall in left, scoring Barnes.
Corey Dickerson followed with a double down the left-field line to score Culberson, Ryan Wheeler added an RBI double later in the frame, and the Rockies pushed across another on a throwing error by Chris Owings to go up by 6-0.
"They pitched good; they played good," D-backs manager Kirk Gibson said. "They took it to us."
Rockies up next: Righty Jordan Lyles, who had callups the last three seasons with the Astros and hopes to earn a spot in the season-opening rotation, will start for the Rockies against the Reds at Goodyear, Ariz., on Saturday at 1:05 p.m. MT. Left-handed hitting competitors for center field Charlie Blackmon and Corey Dickerson will make the trip. The Reds are scheduled to start lefty Tony Cingrani.