A D.C. Superior Court judge sentenced a 23-year-old Northeast Washington man yesterday to 23 1/3 years to life in prison for the 1980 killing of a "Good Samaritan" bank customer who tried to foil the holdup of a downtown bank.

Judge Annice Wagner sentenced David W. Basnight of 4046 Gault Pl. to serve the maximum sentence of 20 years to life for shooting the customer, John David Bowen, 30, who was making a deposit at the First American Bank branch at 13th and G streets NW at the time of the robbery. Wagner also sentenced Basnight to serve 3 1/3 to 10 years for carrying a pistol without a license.

Bowen had gone to the bank to make a deposit for his employer, a downtown wholesale florist, and was carrying a pistol. As Basnight, armed with a revolver, fled the bank after the robbery, witnesses said at the six-day trial last December that Bowen ordered him to stop. Both men fired. Basnight was struck in the jaw and Bowen in the head and arm. Basnight then stood over Bowen as he lay on the floor and shot him two more times in the back.

Wagner last month sentenced Evans A. Turner, 32, of 1732 S St. SE, the driver of the getaway car and the man Assistant U.S. Attorney F. Joseph Warin called the "mastermind" of the robbery, to 20 years to life in prison for the killing.