Over the long term, stocks outperform bonds. So, stock market investments should be one component of a plan you use to prevent your savings from running dry before the end of a retirement that can last 20 or 30 years or longer.