Why are capacitors used parallel to transistors
The capacitor that is parallel to the photo-transistor is used to extend the time the DO_LED is on after the flame has disappeared or momentarily ceased. The recharging of that capacitor (100 nF) is via the 10 kohm resistor hence the CR time is 1 millisecond.

The only other capacitor is across the power rails and this is a requirement for most op-amps to ensure stability and/or correct operation.