A flashlight is...
A flashlight is a case for holding dead batteries.
This is a joke that doesn't have a setup. It only has a punch line. In my eyes that makes it funnier. It is also a definitional joke, which is where the joke lies in a humorous definition of a common word or phrase.
The joke is based around the idea that the batteries in a flashlight often are used up (so that the flashlight is not useful for lighting things up like it is supposed to). It makes the assumption that for some reason the person keeps the dead batteries in the flashlight not because they have never gotten around to replacing them, but because they actually want to store them, and that the flashlight is the place that they wanted to store them in.
This is pretty absurd, but it is also pessimistic - and it seems that there is humor in that as well.