The Unclutterer blog rounds up the advice of some pretty knowledgeable minds (including go-to food science guru Harold McGee) on the best ways to store coffee, whether as whole beans or ground. The take-away is to never put coffee in your refrigerator, and only store your coffee in the freezer if you can't use it within two weeks. Otherwise:
From the Joy of Cooking: "The best way to store coffee beans, ground or whole, is in an opaque airtight canister at room temperature."
McGee's wisdom is to only place whole beans in the freezer, as ground coffee gets stale more quickly in any environment. For more tips on getting your best cup every day, see these tips from a "coffee snob."