Jorge Soler added a solo homer for the Braves, who won their third in a row and stayed three games ahead of second-place Philadelphia. The Phillies beat Baltimore 3-2 earlier in the day.
Riley hit his 30th home run in the first inning, a drive deep into the left-center field stands. The 24-year-old third baseman continues to evolve into a cornerstone for the Braves lineup, batting .300 with 94 RBI.
Albies hit a shot far into the right-field seats in the third. He's up to 29 homers this season and has 97 RBI.
Soler's homer was his 24th season and 11th since coming to the Braves in a midseason deal with the Kansas City Royals.
Even without star Ronald Acuna Jr., who is out for the year with a knee injury, Atlanta has flashed a powerful lineup. Six of their eight starters on Tuesday had at least 26 homers this season.
Jesse Chavez started for Atlanta in an opener role, pitching a scoreless 1 1/3 innings. Drew Smyly (10-4) followed, giving up one run over 3 1/3 innings while striking out four. Luke Jackson loaded the bases in the eighth but got out of the jam when Jake McCarthy flied out.
Luke Weaver (3-6) took the loss, giving up five runs — three earned — over 6 2/3 innings. All of the runs scored on three home runs.
Weaver threw 102 pitches, including 78 strikes, but too many of them were over the middle of the plate. His defense didn't help much with three errors.
The Diamondbacks had an all-too-common sloppy start when third baseman Josh VanMeter mishandled a grounder for an error on the first play of the game. Three batters later, Riley made them pay with the two-run homer.
The D-backs and Baltimore Orioles both have 103 losses this season, tied for the most in the big leagues.
DUVALL'S STREAK ENDED
Braves OF Adam Duvall was hitless in four plate appearances, striking out three times, bringing an end to his career-best 16-game hitting streak. Duvall is in the midst of a career year with 37 homers and 107 RBI.
Diamondbacks rookie 1B Seth Beer will have surgery on his left (non-throwing) shoulder this week. He dislocated his left shoulder diving for a ball one week ago against the Dodgers.