Controlling AC load from a microcontroller GPIO with triac
(1) For U1, I want to use MOC3021 optoisolator, will that be OK?
Yes.
(2) For U2, I want to use BT134-600 triac (600V, 4A), will that be OK?
If your AC loads will be 240 V, 1000 W, a 4A triac is &quot;just enough&quot;, and this is not adviseable. Choose a 8A x 800 V triac, the price difference is minimal.
Be careful with 240 AC mains.
(3) How do I size R1 and R2, can I use just those same values?
These values are not critical. But make sure that your uC output pin can supply the MOC3021's trigger current (edited), and that the load resistor R1 don't reduce this current. Maybe it will be necessary change the load resistor, or add a transistor.
Check the sensitivity data of the 8A triac, maybe you will need to change R2 value (most probably 1k will be OK, but this should be checked).