We present a unified view regarding the use of diffractive optical elements (DOEs) for microscopy applications a wide range of electromagnetic spectrum. The unified treatment is realized through the design and fabrication of DOE through which wave front beam shaping is obtained. In particular we show applications ranging from micromanipulation using optical tweezers to X-ray differential interference contrast (DIG) microscopy. We report some details on the design and physical implementation of diffractive elements that beside focusing perform also other optical functions: beam splitting, beam intensity and phase redistribution or mode conversion. Laser beam splitting is used for multiple trapping and independent manipulation of spherical micro beads and for direct trapping and manipulation of biological cells with non-spherical shapes. Another application is the Gauss to Laguerre-Gaussian mode conversion, which allows to trap and transfer orbital angular momentum of light to micro particles with high refractive index and to trap and manipulate low index particles. These experiments are performed in an inverted optical microscope coupled with an infrared laser beam and a spatial light modulator for DOEs implementation. High resolution optics, fabricated by means of e-beam lithography, are demonstrated to control the intensity and the phase of the sheared beams in X-ray DIG microscopy. DIG experiments with phase objects reveal a dramatic increase in image contrast compared to bright-field X-ray microscopy.