Nucleophilic substitution with chloroethane: hydrogen cyanide vs. potassium cyanide
Because hydrogen cyanide is not a very strong acid.

Potassium cyanide exists as potassium and cyanide ions, so here the cyanide ions can act as strong nucleophiles. Hydrogen cyanide is only a weak acid and so it will not dissociate to produce a significant amount of the cyanide ion nucleophiles. So it is a better idea to use potassium cyanide.