Luiz struck either side of halftime, his second goal from the penalty spot, to put Unai Emery's side in control.
A deflected shot by Jarrod Bowen offered the visitors a lifeline and they threatened to draw level before Ollie Watkins struck with an exquisite finish after a counter-attack.
Leon Bailey came off the bench to put the icing on the cake with a superb fourth late on after cutting in from the right.
High-flying Villa are unbeaten in five league games and have 19 points from nine games, one point outside the top four.
West Ham are in ninth place on 14 points.