Diffraction is probably the ultimate limiting factor in how sharp your pictures can be (more precisely, what resolution you can reach in an imaging system).
All lenses are diffraction limited to no more than about 1500/N to
1800/N line pairs per mm, where N is the lens f stop. Notice that this means that the more you stop down the lens, the smaller the diffraction limits gets.
Consider, for example, a very good lens projecting an image on a piece of very good film. You could reach a resolution of 100 lines per mm. But you need a lot of depth of field, so you stop down to f 22. Which means that your resolution is approximately limited to between 68 and 80 lines per mm. And you lose.
Of course, before you reach the diffraction limit in photography, you need to fix all the other forms of unsharpness, like bad focus, film defects, aberrations, camera shake ...