It can affect ripple, depending on its operating point and mode of operation.
If a fixed-frequency buck converter is operating in CCM, then ideally the duty cycle and ripple only depend on Vin and Vout. But resistances in the converter make this not completely true, and the control circuit will make slight adjustments to duty cycle when the load changes, which will affect ripple. Generally the resistances are low, and thus the changes in D are low as well, as are the changes in ripple.
For a fixed frequency buck converter operating in DCM, changes in loading result in significant changes in duty cycle, which can affect ripple significantly. Also variable frequency buck converters will change frequency with load, also giving rise to variation in ripple.