I have a few hundred images, some of them are just too dark, some others are fine but a level adjustment would be beneficial I think. Is there any program that can automatically adjust level, calculating good settings for each image (for example setting black and white to the first level which is not null, or maybe something more sophisticated).
If all pictures that are to dark are to dark "in the same way" and you've photographed them in raw then you can just create an .xmp file (a little metadata file containing "development settings") and apply it to all photos using any program that can handle raw.
If your photos are in some other you could try IrfanView's batch mode. It has some auto adjust buttons but it also has loads of settings if your images are all "wrong" in the same way.
If you feel familiar with a command line interface and programming then ImageMagick is wonderful for batch image processing.
I know this doesn't really answer you question but bottom line is that there probably isn't any software out there that will do a good job on EVERY picture. So I think your best bet is to group images into sets that require more or less the same processing and then run a batch on each group.
Apple Aperture (Mac only) has an Auto-enhance preset that you can apply to your photos as you import them, or on a batch of already imported photos.
This does a pretty good job of setting a set of usable curves and shadow/highlight settings, as well as adding some vibrancy (often needed when importing RAW files).
I often use this when importing, and then just reset all the processing on the best shots and do all the post processing manually on those few that I want to show.
But the program is, like Lightroom, much more than a post-processing tool. It is more of a photo library management tool.