The sensor/camera can only record the image presented by the lens, but has a big influence on the end result. Resolution obviously, with more pixels. And a sensor with high dynamic range will record more detail in the shadow areas, more so at at low ISO. Post processing can have an even more dramatic effect.
One thing that I don't think has been mentioned directly is the physical size of the sensor that probably has the biggest impact on sharpness. Larger sensors allow the lens to perform better, because they need less enlargement in final output. Therefore they demand lower resolution from the lens, which in turn means the lens produces higher contrast images (basic physics, MTF [modulation transfer function] theory - when resolution goes up, contrast goes down). This is why full-frame is sharper than APS-C, which is sharper than M4/3, which is sharper than 1-inch, which is sharper than compacts etc.