While it was police work that led to his eventual arrest, it was the people of Los Angeles who took care of apprehending Richard Ramirez. After several sexual assaults and murders, authorities had no evidence with which to determine who The Night Stalker was. But then, he left a fingerprint.
Already having a record, the print quickly led to the mugshot for Richard Ramirez. Authorities circulated that to the media, and enough people saw it to respond quickly when needed.
Someone recognized Ramirez trying to steal a car in LA, and an angry mob quickly gave chase. According to the El Paso Times at the time, citizens helped police track and chase Ramirez for an hour, before catching up with him and beating him.
The Gif above shows him at the instant he was captured and bandaged up.