there are lots of past threads on this topic, so if you do a quick search you'll find a ton of information and lots of opinions (and experiment results)....
I can tell you what I do. I use the NFSC (recipe on this site), and I don't like to let more than 3-5 days go by between baking and delivering. If I'm sending them somewhere, I like to have less than 7 days before they reach their destination and will be eaten.
that said, however, a lot of people allow more time with no problem. I'm very food safety conscious, and I have a very good sense of taste and smell, so I like things to be very fresh. here's a recent thread on just that topic (edited to add link) http://www.cakecentral.com/cake-decorating-ftopict-660400-fresh.html
Also, you should know that many people have frozen cookies, both after baking/before decorating and after decorating with good results. Here's one thread about freezing to get you started...
hope that helps!