We can see diffraction of light if we allow light to pass through a slit, but why doesn't diffraction occur if we obstruct light using some other object, say a block? Why are shadows formed? Why doesn't light diffract around the obstruction as it does around the slit?
Light will diffract around anything, including a block. We simply don't observe this diffraction because most blocks are very large compared to the wavelength of light. One historically-famous example of diffraction around an object is Poisson's spot, in which diffraction around a circular disk is easily observed.
Good question. Actually, early 19th century this question was put forward as an argument against diffraction theory.
The below is from http://minerva.union.edu/jonesc/scientific_photos%202010.htm :
"In 1818, Fresnel presented his theory explaining diffraction of light. Poisson denied the truth of the theory, and argued that a consequence of the theory would be that there would be a bright spot right in the middle of the shadow of a circular object. The spot, shown above of the shadow of a ball bearing suspended on a needle, was promptly discovered by Arago. This was a lot harder to do before lasers were invented!"
Note: observation of such diffraction patterns are best done in (nearly) monochromatic light. Hence the remark about using lasers. The bright spot at the center of a circular shadow is known as an Arago spot.