why there are two capacitors in half H-bridge motor driver circuit?
Vcc is DC.
You should provide a link and/or reference to the source document to help people help you.
You should have a good idea that Vcc is DC from the context in which you found the diagram. 

The two capacitors act similarly to two switches.
Current flows alternately in either direction through them, so that their net DC current is zero - so they pass alternating current.

It is best but not necessary to assume C1 fully discharge and C2 fully charged, as will be the case at the start of the cycle below. If desired you can start with C1-C2 centre point at V22/2 which is the starting condition. 

Q1 on.
Current flows Vcc-Q1-L1-C1-ground.
C1 charges and C2 discharges (as its voltage decreases) so C1-C2 centre point voltage rises towards Vcc.

When V C1-C2 approaches Vcc the 1/2 cycle is complete.
Now:

Q1 off. Q2 on 
Current flows Vcc-C2-L1-Q2-ground. 
Thge C1-C2 centre point falls towards ground.
Current passes through L1 in the opposite direction to the previous cycle. 

QED



Note that as Andy says in his answer, C1 &amp; C2 may be sized such that the center point voltage vary little over a half cycle. You still get bidirectional AC current in L1 - which is the object.