I have a D90, too.
If you haven't changed the default auto-focus mode, then it seems that the camera picked the focus point for you and decided to focus on the wall for some reason.
Take a look at p. 56 of your manual. That page tells you how to get the camera out of the default auto focus mode and pick one of the 11 focus points yourself. Doing so - and putting yourself in charge of the focus point - almost always leads to more accurate focus.
The more you do this, the more it will become second nature, and you'll miss less photos due to poor focus. It just takes practice.
P.S. Can you post your EXIF data, too? It might help us figure out if there's some motion blur, too.