Though Warren Buffett has indeed recommended index funds to individual investors, he has repeatedly argued that the fundamental premise of index investing (that is, EMH, the efficient market hypothesis) is fatally flawed and that index investing is basically a stupid thing to do: "Naturally, the disservice done to students and gullible investment professionals who have swallowed EMT [efficient market theory] has been an extraordinary service to us and other followers of Graham. In any sort of a contest -- financial, mental, or physical -- it's an enormous advantage to have opponents who have been taught that it's useless to even try. From a selfish point of view, Grahamites should probably endow chairs to ensure the perpetual teaching of EMT." Buffett basically says that if you don't have time to dig into stocks, then index funds are the way to go - though they're still a terrible way to go. I disagree. When you look at the academic literature as well as Buffett's own philosophy (which draws heavily on the work of Benjamin Graham and David Dodd), investing based on value works over time and handily beats the broad indices. That is, if an investor buys what is undervalued, they will outperform the market. Now, to truly understand if a security is undervalued requires an enormous amount of knowledge and analysis, but it's been shown that even rough proxies for undervaluation (i.e. simplistic statistical screens such as price/earnings or price/book) work, and work well.
Joel Greenblatt, another very successful and highly respected investor (who subscribes to the same investment philosophy known as "Value Investing" that Buffett follows and Graham birthed), also disagreed with Buffett and he proposed a system that does in fact recommend buying undervalued securities as determined by statistical screens. Here's his site below: http://www.magicformulainvesting.com/welcome.html
If you buy the index when the market is overvalued, you'll end up doing very, very poorly. This is not about market timing; this is about valuation. You could use a simple P/E or a Schiller P/E (http://www.multpl.com/) to understand where the market stands on a valuation basis. This is the sort of analysis that Jeremy Grantham, another very successful value investor, does when he determines asset allocation and security selection (http://www.gmo.com/America/). If a certain asset class is overvalued, then why would you put the same amount of money into it? You want to put more money into the asset classes that are undervalued. Asset allocation should not be a static allocation; it should vary based one very important factor - value.