Diazomethane is carcinogenic. Furthermore it may explode on contact with rough (ground connections) or sharp (crystals) surfaces.
Trimethylsilyldiazomethane is said to be more safe in use than diazomethane. It is distributed as a ready-to-use-solution in hexane or diethyl ether - so there is no need to prepare the active compound like the preparation of diazomethane. Especially this derivative does not tend to explode. On the other hand this compound is also carcinogenic and very toxic when it is inhaled. Furthermore it is very expensive. The price for 25 ml of a solution in diethyl ether is about 40 €. In the online-version of Org.Synth. a synthesis for the compound is described.