The conventional wisdom on coffee is that green beans are good for 15 years, roasted beans for 15 days, and ground beans for 15 minutes. Since ground coffee loses its aroma and flavor so quickly, does that mean it's a crime to grind it the night before you use it?
Tara57 grinds hers the night before, and thinks it's fine. Likewise rabaja grinds coffee and sets up the coffee maker the night before with no worries about diminished flavor. Besides, you're only likely to notice a difference if you're starting with superfancy, freshly roasted coffee beans, ThanksVille says. If your coffee has been roasted by a master roaster within, say, three days, then grinding it and leaving it out all night might border on criminal negligence.
And if you're not using a burr grinder, but rather a "cheap, whirly blade grinder" that grinds unevenly and heats up the grounds in the process, bg90027 says, you're even less likely to notice a difference. Bottom line: Unless you've already gone pretty far down the coffee-geek rabbit hole, you probably won't notice much difference in beans ground a few hours ago.
Discuss: Grinding coffee beans
Photograph of hand-ground coffee by HLing