Input Ripple Voltage and Output Ripple Voltage for Capacitors
Both capacitors have ripple because inductor current rises or falls.
You have the output ripple figured out, either the inductor current is large enough so current can charge the cap, or the inductor current is low so cap must discharge into the load.
Same goes for the input capacitor. Either switch is on so current is drawn from it to raise inductor current, or switch is off so no current is drawn from it which is the phase when inductor current falls.