This depends on what your financial goals are. If you are simply looking for a passive way to invest and seek predictable, incoming cash flows — you can buy bonds at any given time.
With that said, if you’re looking to time the market well, many investors will buy bonds when inflation levels are declining. This is because when inflation falls, so do interest rates. In turn, this can lead to increasing bond prices.
Additionally, a good time to buy bonds is when the stock markets are going through a prolonged bear market. This allows you to hedge against falling stock prices.