In general, the IRS has three years to audit your return while the Franchise Tax Board has four years. Three additional years can be tacked onto these timeframes for cases where there is substantial underreporting of income. There is no time limit in the case of fraud or when a return has never been filed.
Documents relating to real property, such as escrow closing statements and receipts for capital improvements, should be kept until the property is disposed of and then for the applicable tax audit period.
You should retain investment confirmation slips and year-end statements for mutual fund accounts for as long as you own the investment, plus an additional three years. This is very important if you have dividends and capital gains reinvested as this increases your basis.