If the lens has dust, fingerprint smudges, or is otherwise dirty, it may not be able to focus properly. Use a microfiber cloth to clean the lens, and then take a photo. If you think you see dirt inside the lens, take your iPhone to an Apple Store or authorized service provider. Set the focus point.