First of all a maker and model name would have been helpful.
Try a 'Re-set to default....manufactured settings then take a picture. If it's still dark its the camera repair shop.
However
If it takes a proper picture then if you want to set your own settings do one at a time note which it was and after each setting take a picture. If you come to a setting that shows a dark picuture after you entered the new setting then it's the one causing the problem.
Bob
November 2010