We synthesize nanoscale ripple patterns on Si surfaces by ion sputtering and show a systematic variation in the wettability of the surface depending upon its structure and chemical composition. As a matter of fact, our experiments reveal a hydrophilic to hydrophobic transition of the Si surface as a function of morphology and composition. Observed variation in the contact angle is found to be consistent with Wenzel's law up to the onset of a sinusoidal ripple pattern formation on the Si surface, although a clear deviation from Wenzel-like behavior is detected after ripple formation. This deviation is attributed to a reduction in the surface free energy of ion implanted Si surfaces due to the formation of ripples. Further, we detect the existence of a top amorphous layer and the presence of Ar atoms near the top surface for all ion implanted Si samples. Thus, to understand our results, we take into account the compositional modification of the implanted surface due to incorporation of Ar atoms and attempt to correlate the observed evolution of contact angle with this compositional heterogeneity following the ripple formation. We have shown that the pinning behavior of a water droplet on the rippled-Si surface, due to the presence of ripple height, can be altered through a change in the surface composition.