For very small systems like the worm c.elegans it must be possible to record from all neurons at the same time, at least optically.
While it is true that whole organism optical recording is technically possible in C. elegans, I'm not aware of any published work where all neurons were identified and recorded from simultaneously and then combined with connectivity data in a systematic way.
I should note, that this isn't limited to C. elegans. Florian Engert's lab has published whole-organism recordings from zebrafish as well. At the moment, though, there are still technical challenges to work out before we get the input-output relationships you desire on a whole organism level. First off, the recordings aren't truly simultaneous, in the sense that it still takes time to build up 3D images from z-stacks. Second, the image processing to label neurons is not yet robust. And finally, the most popular optical indicators are based on calcium levels and thus provide only a proxy for membrane potential and furthermore they have limitations in time resolution, range and accuracy.
The field, however, is progressing rapidly and I suspect that these challenges will be overcome in the next few years.
What are the best databases to ask such questions?
There are no database yet for C. elegans neural activity, likely because the number of groups publishing optical recordings in C. elegans is still fairly small. But as more labs pick up the technique, I think the value of a database will become more obvious to the community and the OpenWorm project is providing some well-needed leadership in this area.
Finally, I should point out that in the end we may find that neural activity and connectivity provide only one part of the story. It is likely that in C. elegans neuromodulators and other "unwired" connections between neurons could play very important roles as well.