For example, for hydrocarbons, the ones with low molecular weights exist as gases and thus have low solubility.
Otherwise, solubility can be determined by functional groups/polarity
In general, if you're talking about long chains of saturated hydrocarbons (or hydrophobic molecules) the smaller they are, the more soluble... the longer ones are less soluble.
Lots of things can factor into solubility.... do you have a specific question?
More molar mass -> more LDF attraction (generally), which def increases solubility in non-polar solvents, non necessarily so in polar solvents of low molar mass.
Answer is solvent dependent.
large and small saturated hydrocarbons will be soluble in a nonpolar solvent (only dispersion forces at work from solvent and solute).
large and small polar molecules will be soluble in a polar solvent (hydrogen bonding means it is very polar. for instance alcohols dissolving in water; both are able to hydrogen bond and so like dissolves like).