You get the ripple current from
dI/dt = V/L
dt = ontime (or offtime)
V = voltage over inductor during the ontime (or offtime)
Then look at the ripple current rating of the capacitor.
You are pretty much done at that point, with electrolytic capacitors; if you get large enough part to handle the ripple current, it has quite some capacitance to deal with ripple voltage, as well.
Buck output is about an order of magnitude easier on the caps than the buck input. Electrolytics are often OK, even as-is.
Buck input requires lower ESR, and the input loop area should be small, easier done with small ceramics with less lead stray inductance.
Never use tantalum unless you know what you are doing.