When cyanide ions act as nucleophiles in substitution reactions, why is KCN the reagent of choice? Would some other source of cyanide such as NaCN or HCN work equally well in the reaction, since they should dissociate to give cyanide ions as well?
NaCN is quite alright. The main problem with HCN, on the other hand, is that it's a relatively weak acid which is barely dissociated (pKa 9.71). So, trying to use HCN as a source of CN− is like trying to use H2O as a source of OH− ions, which is not likely to work. On top of that, it's gaseous, and getting it into your reaction without killing yourself can be quite tricky.