There are those who believe that houses hold onto the bad things which happen inside. Therefore, if there had been suicides or murders, the spirits of those troubled human beings would likely hang out in the houses.
Recently, the Pennyslvania Supreme Court ruled that the real estate agent does not have to disclose the possible presence of those earlier residents to the buyer. With the exception of two states - Texas and California - all the other states agree on the legality of non-disclosure. Here is the coverage in Bloomberg Business Week by Patrick Clark.
Of course, the ethics involved is another kettle of fish.
What might motivate the agent to warn the buyer is that the business is a referral one. Should the ghosts act up, the buyer could complain in the community and the agent is toast.
Another incentive could be not wanting the any bad karma or voodoo to seep from the house onto the agent. Anyone who has studied the paranormal know that there is no end to the mischief ghosts can stir up. They might be furious with agents for bringing in owners not sympatico to the spirit universe.
Full Disclosure: In the late 1990s, I bought an old Victorian house in Norwalk, Connecticut which turned out to be haunted. I hired psychic Mary Ann Kremer of New Jersey to instruct me how to make peace with the spirits. When I put it up for sale, I didn't tell the agent about the presences whose anger was unpredictable.