How does solubility relate to bonding?
The relation is in terms of relative strengths of intermolecular forces.
A good rule of thumb is "like dissolves in like" in terms of the strengths of the intermolecular forces between particles.
For example, since water particles are held together by strong hydrogen bonds, solutes whose particles are also held together by strong intermolecular forces will be soluble in water and dissolve in it. Such examples could include sodium chloride particles which are held together by strong coulombic forces.
Carbon tetrachloride on the other hand has particles held together by weak van der Waals forces and hence will not be soluble in water. It will however be soluble in a solvent who also has weak intermolecular forces such as Bromine.
Considering longer chain alkanes, the solubility in water will increase as the chain length increases due to stronger intermolecular forces according to Newton's Law of Universal Gravitational attraction between particles.