If it is happening in good light with the centre sensor then something could be wrong inside. The lens needs a high contrast AF target at full extension as others have said. Has the lens been dropped or taken a knock?
My camera with 18-200VR was blown over while mounted on a tripod a few years ago. The lens zooming and focus mechanism was damaged. I could focus and zoom manually but the mechanism was too stiff for the AF-S motor to move it. I sent it in for repairs and they replaced the zooming mechanism. The lens has worked OK since then and the cost of repair was about 1/3 the price of a new lens