It does not matter what is in the bag because you cast the spell on the bag, not what is inside it, and only the bag would continue to glow after you dumped it out.
In the context of the question, I am targeting the bag's contents. If that was not clear to you, let me be precise:
You have a pile of marbles, beans, sand, etc., upon which you cast the light spell, and then bag it. (Which is what you'd want to do anyway, in order to control when the light can be shone.)