Prostitution being illegal is based on a religious aspect which is unacceptable. Whether it is bad or not is a moral issue and personal morality is none of the government’s business as long as both adults are fully consenting and there is no coercion.
Separation of church and state has not fully happened in this country unfortunately.
While I think solicitation on the street should be illegal because the street is a public place I think what two consenting people do in the privacy of their own homes is their constitutional right.