A minimal buffer is preferred (i.e. 20 mM HEPES, pH 7.5) to minimize background. If specific components are known to be necessary for sample stability, these should be present in the minimum amount possible. Greater than 1% of glycerol, sucrose, or DMSO in the diluted sample should be avoided. Detergents can be used but should be kept below their CMC, unless they are used to solubilize the sample. For negative stain specimens, phosphate buffers should be avoided.
For nanoparticle characterization samples, the dilution buffer composition can be your formulation buffer, but preferably without sucrose, glycerol, maltose (or other cryo-protectants) or high salt. These components negatively affect the particle contrast In the images. If you cannot get around adding any of these, NIS would suggest keeping the cryo-protectant below 2% and the salt concentration below 500mM.
For structural biology samples, most reagents and buffer conditions are amenable to cryo-EM however not all are compatible with cryo-EM sample preparation. For example, DMSO may interfere with the vitrification process and cause crystal formation. Similarly, excessive sucrose can increase sample viscosity and interfere with particle alignment during data collection.