Allen's previous high was 14 points against Oregon on March 1. He made 10 of 12 shots from the field against UC Davis.
Corey Hawkins, the Big West Player of the Year, scored a season-high 34 points on 12-of-24 shooting for UC Davis (25-7), which played its first NCAA Division I postseason game in school history.
Stanford (20-13) will play Rhode Island in the second round.
Stanford opened the second half on a 20-6 run, extending its lead to 57-42 with 11:50 left to play. Allen ignited the run with three straight baskets to open the half.
Hawkins scored 21 points on 7-for-10 shooting in the first half, but Stanford led 37-36 at the break. Randle and Allen each scored eight first-half points for the Cardinal.