There is a bunch of it depends there. California has more homelessness than other states. Part of this is in some areas housing is so expensive middle class people cannot afford to live there, but they can get jobs there and so being homeless is often the only option if you don't/can't leave. Part of this is California has a fairly mild climate (well in the places people live): you won't be comfortable some nights, but the weather won't kill you.
States with lower housing costs do appear to have lower homelessness rates.