I am still collecting UCG from Starbucks. The bag says use the grounds within 2-3 weeks. I had planned to use them next spring, some directly on my lawn and some in my compost heap. Does UCG lose its "potency" over several weeks or months?
They might lose a little N, but I think the bigger concern is that they might start to decompose anaerobically (and smell bad) or mold. If you don't dry them before storing them, they'll probably be pretty badly clumped, so they'll be harder to spread on the lawn.
I stored mine in a big plastic trash can with plastic lid. Just like BP suggests, they molded and got dry and hard/clumpy.
I don't think it much affected the potency. Organic matter is organic matter.
I quit using them because here in my semi-arid climate they made my soil water repellant. Not helpful. And, while they were free, the time and gas I spent running around to collect them probably cost as much as organic matter I could buy in bulk (especially when my time was factored in).
For those who can get them in one easy stop and/or enjoy investing the time and effort to gather them up little by little, and who live in wetter areas, they are one of the fine choices for adding organic matter. Also, those wanting to reduce waste going to dumps that doesn't have to can feel good about contributing in a small way to that.
Organic matter is good. But, coffee grounds are simply another organic matter source, not magic.
If they get infested with bugs then you might lose some strength from the coffee itself, but you will still have to bugs to fertilize with.