If you're using an Apple adapter and it doesn't charge, I'd advise you try this:
You should try backing up the data, restoring the device as new and try if that solves the problem. NB: set up as NEW device, don't restore with backup, because a software issue will also be in the backup. If the issue persists after restoring as new, the device may need service.
For the steps: http://support.apple.com/kb/HT4137
Good luck! !
If it DOES charge while connected with a wall charger but doesn't charge when connected to computer, check out this article: http://support.apple.com/kb/HT4060