Selling is probably never a good idea. You are going to end up re-purchasing them eventually, so what's the point?
Incorrect, all of the speed achievements require shrewd selling strategies. The general gist is to buy infrastructure to get a certain cps+ then sell a % of that infrastructure to immediately buy a seriously upgraded infrastructure that produces a higher cps allowing the sold infrastructure to be replaced more quickly than you would have been able to simply wait for the lower infrastructure to produce the cookies needed for the higher infrastructure alone.
e.g. (all numbers just random guesses)
begin by buying 15 cursors and 15 grandmas for 1,000cps
sell 10 cursors and 5 grandmas and buy a portal for 3,000cps
buy back the 10 cursors and 5 grandmas with a much more quickly appreciating cookie bank
I think you sell at 50% of buy value.