DSLR problem Lense is Off center is what i think they call it?

Okay so this is my prob i have a Nikon D5100 and lately when i take pictures they seem fine on the viewfinder but when i take a picture and look in the gallery the pictures are not aligned with the picture i took the picture seems to be a little facing more on the left, but when looking at it on the viewfinder everything seems fine. Could this be a prob in the Lens or is it a prob within the cameras sensor, mirror or etc?

You need to have a repair shop look at the camera.
The focusing screen and sensor must be aligned in order for them to match.
Usually such a problem is the result of the camera body being hit rather hard.