Some photography method questions...
What is not in focus in the photo? Are you too close to the object?
Are you photographing other things that have some bright light in the frame?
Do you have enough light on whatever you are trying to photograph? Sometimes if you just turn on the camera and have something a few inches away -- the camera won't focus --- then you have to move back a bit before moving closer. If you are doing a lot of macro photos, I would recommend using Manual focus because AF won't always get all the details you want.
What focus mode are you using?
Have you tried doing a settings reset on the camera?
Is the lense totally clean of any smudges or 'haze'?
Some mechanical questions...
Have you dropped the camera at all?
Is there any dust or dirt in the lense?