Yields are related to liquidity and risk. Since bonds vary in price during their life, you could take a loss if you unexpectedly had to sell a bond prior to maturity. Also, the issuing company could go bankrupt and be unable to repay the loan. Government and municipal bonds can have tax advantages. These rating indicate how likely it is that the bondholder will be able to repay the loan.
Lower rating require higher yields to attract investors, but represent higher risk.
Ratings provide a standardized and valuable tool for the bond investor. When interest rates go up, bond prices go down. Rule 2 is the converse of rule 1. When interest rates go down, bond prices go up. The price of a bond is less volatile when its maturity date is close.