Refurbished cameras get individual inspection to ensure they meet Nikon's specifications and standards. Only a small handful of the brand new cameras get inspected as closely.
Refurbished cameras are technically not new. Imagine someone buys a new D90, takes 25 shots and then decides to return it for some reason and get their money back. That camera cannot legally be resold as new, so Nikon inspectors check it over, do whatever needs to be done to return the camera to like new condition, and sell it as refurbished with a 90 day warranty. a refurbished camera may have failed a mid-manufacturing test and required repair or it may have been used briefly by Nikon for demo purposes.
Both cameras have a built-in AF sensor. Plus, they both use the same Nikon Multi-CAM1000, 9 focus point AF module. The D90 has an autofocus motor built into it that could be used to drive the focus mechanism of non AF-S lenses.
The D90 has better and more usable low-light ISO performance, and more dynamic range than the D3100 according to the independent testing lab DXO Mark:
DxOMark - Compare sensors
Add that the D90 can auto bracket 3 exposures, has a top LCD, 2 command wheels, Commander mode when using CLS (Nikon's Creative Lighting System) and has a shutter life rated for twice the D3100 shutter.
In short, the D90 offers more for the value for the $$$.