The letter of California law is 3 years mandatory disclosure of a death as SDR said. If it happened prior to 3 years ago, the seller doesn’t have to volunteer the information, but they still have to disclose if asked. (I KNEW I took those RE classes for a reason!)
Some states, Hawaii is one that I know of, require the seller to disclose hauntings. As much as skeptics like to pretend they don’t happen, they do (whether the cause is a ghost or something more down-to-earth), and if it was disclosed, I’m guessing it would affect the price.
The house we bought in Temecula had a suicide on the premises 6 months prior. She died at the hospital. The house was perfect, so for us, the location, etc. far outweighed the morbid history. No evidence whatsoever that she stuck around, but that didn’t stop us from feeling a teeny bit spooked for the first few weeks. For the most part we don’t think about it anymore.