We know that water is a polar molecule. It is also known that "like dissolves like". So either polar molecule or the compounds which can form hydrogen bonds with water molecules will get dissolved in water.
Glucose and sucrose have five and eight -OH groups respectively. So they are likely to form hydrogen bonds with molecules with water. In the case of cyclohexane and benzene, these are non-polar molecules because of very low electronegativity difference. So these are not soluble in water.