The sharpness of your images is affected by many factors, some beyond your control
Whenever we capture an image there are many opportunities for detail to be lost. The light reflected off a subject will have some influence, as will its journey through the lens, and finally the way in which it is translated into digital image. Fortunately, with careful sharpening, we can increase the perception of detail.
The way in which digital images are captured and recreated means that some loss of detail is only to be expected. In most cases each photosite only receives either red, green or blue information; the process of demosaicing estimates what the values for the other colours are for each pixel before creating a full colour image, but as this is essentially guesswork the method is never 100% accurate.
The low-pass filter in front of the sensor, designed to block higher frequency signals from causing false colour and patterns in images, will also cause a little image softness.
These issues are off-set by incorporating sharpening as part of the in-camera JPEG processing. Although this helps, images can remain a little soft, or conversely, oversharpened.
With Raw images the sharpening is left in the hands of the photographer, who benefits from being able to selectively sharpen certain areas, or globally to the degree of their choosing.
Such sharpening algorithms usually work by increasing the contrast along the edges of details (this can be easily seen by zooming into an image past 100% to see what a sharpening process actually does). By making the boundary between two areas higher, we are fooled into believing that the image has been captured with more detail than it actually was – and, done carefully, this can benefit the image will no adverse effects.
Sometimes, however, it pays to go easy on the sharpening. Too much sharpening can result in ‘halos’, where a white outline appears over the edges of details. It also accentuates noise in high-ISO images, so try to remove this first.
The subject in the images should also be considered before sharpening, particularly with subjects like portraits, where it can emphasise blemishes, wrinkles and so on, leading to unflattering results. As a general rule, if something doesn’t appear sharp in real life, you should take care not to make it so in your images.