The average dividend stock in the S&P 500 yields just 1.5%. That's a fairly modest payout that isn't hard to beat. The danger with high-yielding dividend stocks, however, is that sometimes it can be hard to tell which payouts are safe and sustainable and which ones are too risky to invest in.

Below are three stocks with high yields that are good buys, followed by one that investors are better off steering clear of.

1. Realty Income: 5.3% dividend yield

Realty Income (O -0.17%) is a real estate investment trust (REIT) with a diverse portfolio of clients that spans 85 industries. That diversification helps make Realty Income one of the more stable REITs to invest in. It's unique in many respects, including the fact that it pays dividends on a monthly basis -- most dividend stocks pay every quarter. As of December, the company has declared a dividend for 642 straight months (53.5 years). It has also increased its dividend for 105 consecutive quarters (26.25 years).

The REIT's dividend is also sustainable. In its most recently reported quarter (ended on Sept. 30, 2023), the REIT posted funds from operations per share of $1.04. Meanwhile, over a three-month period, Realty Income's dividend payments total just under $0.77. That makes its 5.3% yield look safe.

With interest rates potentially coming down this year, making REITs more attractive buys, Realty Income could make for a great stock to load up on right now.

2. ExxonMobil: 3.7% dividend yield

Oil and gas giant ExxonMobil (XOM -2.78%) is another high-yielding stock investors should consider for their portfolios. The company profited from higher commodity prices in recent years, and earnings are still strong even as prices have been coming down. While the days of $100/barrel oil have receded for the time being, ExxonMobil also doesn't need those kinds of prices to turn a profit, or for its 3.7%-yielding dividend to be sustainable.

Through the first nine months of 2023, the company's earnings per share were just $6.98 -- far lower than the $10.17 it reported in the same period in 2022. But the good news for investors is earnings per share remains far higher than the $2.73 it paid out in dividends during that stretch. ExxonMobil has a good buffer even if oil prices fall.

The company's dividend survived when oil prices briefly went negative in 2020, and as long as things don't get nearly as bad again, this should make for a fairly safe income stock to hang onto for the foreseeable future. ExxonMobil has increased its annual dividend for 41 straight years.

3. Verizon Communications: 6.6% dividend yield

Verizon Communications (VZ 1.17%) pays an incredibly high yield of 6.6%, which is the highest on this list. The top telecom's stock hasn't been a popular buy with investors, though, as its business growth rate has been sluggish; for 2023, it projects its wireless service revenue will grow between just 2.5% and 4.5%.

Concerns about cleaning up lead-covered cables have also created another risk for investors to consider. But that could take years to sort out, and Verizon is also generating enough profit for investors not to worry about its business. Verizon's payout ratio is just 53% of earnings, which should give investors some confidence that even if economic conditions worsen this year, the business will remain in good shape to continue paying a dividend.

Although Verizon's returns over the years haven't been impressive, this could still make for a dependable dividend stock to buy and hold. Last year the company raised its dividend for the 17th consecutive year -- the longest streak among U.S. telecom stocks.

1 dividend stock to avoid: Walgreens

Walgreens Boots Alliance (WBA 0.57%) would have been the highest-yielding stock on this list if not for its recent dividend cut, where it slashed its payout by a mammoth 48%. Even with the reduced dividend, however, the stock is paying a relatively high yield of 4%.

The problem is that the business remains unprofitable. Walgreens is no longer benefiting from an uptick in traffic related to customers getting COVID-19 vaccinations, and it's also investing heavily into launching primary care clinics. The new dividend is lower, but as long as the company remains unprofitable, another dividend cut could still be possible.

While cutting the dividend will free up cash, it doesn't mean the company will get out of the red anytime soon. The safer option for dividend investors is to simply avoid Walgreens for the time being.