Many digital cameras are set to default to focus continually or have another focus mode that causes the camera to automatically select the main area tha will be focused in a scene. These modes can be unreliable, resulting in poorly focused, soft looking images.
For optimal results for the vast majority of scenes, switch to a single or center area focus mode and lock focus where you want it.
Compact digital cameras may have difficulty focusing when there is low contrast in a scene. If you fail to achieve focus taking photos in low-light or low-contrast situations, lock focus and exposure on something of equal distance which has contrast. Depress the shutter-release button half-way, recompose your shot and then fully depress the button.
For a comprehensive list of causes of focus difficulties and their solutions, check out the Autofocus problems and solutions article.
Anticipate the moment by prefocusing before photographing a fast moving subject. Prefocus on an object of equal distance as the subject will be when it moves in front of you. Keep the shutter button pressed halfway as you track the subject, then press it down fully when ready to take the shot.
If your camera lets you manually focus, or has AF Lock to keep focus locked, use either if the shooting distance remains the same for subsequent photos.
In low light, shoot at the widest angle
When taking photos in low light, shoot at the widest angle. In other words, don’t use the zoom in difficult lighting. The aperture is largest at the wide end of a zoom, and let’s in more light to the camera. If you need to get close to a subject, either “zoom with your feet” or crop the image when editing.