Answer:
It has to do with the polairity of said molelule. If you have vegetable oil, for example, it will not disolve in water because the oil is a non-polar compound, unlike water which is polar. The bond dipoles and differences in electronegetivity in the molecule results in this.