Here's the P/E of the S&P 500 since 1990 split into its two components:
We see that both price and earnings fluctuate, providing for the volatile P/E chart we saw here. Obviously, timing the market is not as simple as buying when P/E's are low, since for all one knows, earnings could drop and actually make P/E's high, leaving the investor holding the bag.
Therefore, other models have been developed that try to determine whether the market is over/undervalued. The Fed model, described here, uses interest rates along with earnings to determine what the market value of the S&P 500 should be. A model developped by Steve Foerster tries to determine when the business cycle hits its peaks and troughs, so that investors can determine when they should buy and when they should sell.
Rather than trying to time the market, value investors try to value individual companies within the stock market, to determine if they sell at discounts to their intrinsic values.