Amid a contentious presidential campaign, a civics videogame from a group founded by retired Supreme Court Justice Sandra Day O’Connor got a lot of play in New York and New Jersey classrooms.

iCivics, a nonprofit, has released 19 free games aimed at helping students in grades 4 to 12 improve civil discourse, use evidence in arguments and understand others’ views.

Anna...