What do you mean by homelessness being illegal? Sending a homeless person to jail? In most civilised societies, food, shelter, basic education, and health care are human rights. So, sending to jail politicians and bureaucrats who fail to provide shelter for everyone?
Alot of countries put homeless people into minimum wage jobs (usually factory jobs). Proponents say it's a humanitarian move because it provides them with a job/food/shelter, but alot of people are against it because they say it violates their freedoms/rights/etc./etc.
As for the thread topic, IMO homelessness shouldn't be illegal. Some people fall on hard times and you can't violate their liberties because of it. Also a small number of homeless people are homeless by choice, you can't punish those few for their lifestyle if it isn't hurting anybody.
Prostitution should be legal but somewhat regulated. If porn is legal why shouldn't prostitution be legal? I see no difference. As long as the prostitute him/herself is deciding to sell their body on his/her own volition, then it's no business of other people what they do.