trying to set up some income for the future (20-25 years from now). Would buying a high yielding stock be a good idea since alot of stocks are probably undervalued?
Yes, buying a high yielding stock in a strong company that has the likelihood of keeping their dividend or better yet, increasing it over time would be a good idea. The problem with just looking at dividend yield is that sometimes companies may lower or cancel their dividend when the times get tough. Looking for solid companies with good yields is a great idea, especially now, when you can get most companies at a significant discount to where they normally trade. But, ensure that you're diversified by splitting your money up into different sectors.
You might want to look at PG (Proctor & Gamble), JNJ (Johnson & Johnson), KO (Coca-Cola), etc. These are reasonably yielding companies that know how to make money and aren't at risk of going bankrupt. If you want really good dividends and faster returns, you might be interested in looking at speculative stocks that have greater growth potential, but also much more downside risk.