This is a question which does not have a one size fits all answer. That is because each business is different and each business owner is different. For some, deciding to sell is decided due to the financials, for others it is a much more personal desire which drives them.
The financials are important; for most, the desire to make money is the very reason they set up their business in the first place. With this in mind, it therefore makes sense to sell your business when it is riding high if you want to achieve the best price for it; it goes without saying that a profitable business is a more desirable one in the eyes of potential buyers.
A business with falling profits is unlikely to be as desirable, and furthermore, those who are interested in purchasing this type of business will be looking to negotiate hard when it comes to price.
There are also reasons beyond the financial that may see you considering selling your business. Life events such as divorce or the death of a business partner may force your hand. Other personal reasons such as stress and the day to day running of the company becoming too much for you to want to deal with anymore are also compelling reasons. If this is where you are, then the timing is more about selling up at a time which is the best for you and your current situation. While getting a good price is still a main objective, the financials may need to take a back seat and become secondary to the necessity to sell.
When it comes to getting the best price, timing is everything. The problem with this is that it is very difficult to predict with absolute certainty the future and what it holds for your business. However there are certain trends you can be on the lookout for regarding both your business and the sector you are a part of as a whole. It is also easier to sell when the overall financial market is healthy and obtaining finance a relatively easy proposition.