How do bond ratings influence which bonds investors buy?

In simple terms, the better the rating the safer the investment.