The "like dissolves like" rule is generally applicable, but nevertheless, many organic compounds are soluble in a variety of solvents. For example, ethanol is miscible both with water and cyclohexane, two opposites in polarity. Ethanol has both a nonpolar CH3CH2 group and the polar OH group. Such mixtures of groups are common in organic compounds. Acetone, CH3(C=O)CH3, is likewise miscible with water and organic solvents.
The longer the carbon chain R in alcohols ROH, the less water soluble they are.
Organic compounds that have an ionic form in the presence of acid or base allows them to be water soluble. For example, an amine such as p-nitroaniline has a low water solubility, but when acid is added, the NH2 group is converted to NH3+ which gives a p-nitroanilinium salt which is water soluble.
Carboxylic acids form carboxylate ions upon addition of base. Stearic acid, CH3(CH2)16COOH, is only slightly water soluble. With NaOH it forms sodium stearate, another ionic compound which is much more water soluble.
So, in general, look for good hydrogen-bonding groups like OH and NH2 if you are looking at water solubility. Molecules that have large nonpolar structures in them are expected to be less water soluble, depending on whether any polar groups are present.
Lots of structural variables = lots of gray area when attempting to correlate with solubility!
Steve