1580s, "cause to make a weak, sharp, sound" (transitive), of imitative origin (compare Dutch and East Frisian klikken "to click;" Old French clique "tick of a clock"). Intransitive sense "make a weak, sharp sound" is from 1610s.
The figurative sense, in reference usually to persons, "hit it off at once, become friendly upon meeting" is from 1915, perhaps based on the sound of a key in a lock. Mental figurative meaning "to fall into context" is by 1939. Related: Clicked; clicking.
"a small, sharp sound," 1610s, from click (v.). As a sound in certain South African languages, 1837. Click-beetle attested from 1830, so called from its ability, when on its back, to spring into the air with an audible click.