The motors in the servos generate electrical noise on their power supply connection when they run, plus they can draw a lot of current when the motor goes from a stop to a start and that can cause low-voltage conditions for the other things being powered by the same supply. The capacitors filter the noise and help supply extra temporary current when the motor starts up. The low-value 0.1uF helps with high frequency noise and the larger valued (say) 47uF helps with temporary current and low frequency noise.
This is beneficial since the Photon will work better with a “clean” power supply that does not have noise or low-voltage conditions. You might only need one pair or you might need many depending on your wiring and current needs with multiple servos running at the same time or starting and stopping often. Start with one pair and add as needed–they are cheap parts.