Transistor AND gate — this is what you want to achieve and conceptually it is right. However it has one issue. The
Rout resistor must be chosen well, as some voltage will appear on it even if the upper transistor is turned off. Albo both inputs, while low, must be close to 0V or the transistors may still turn on. That can’t be blindly assumed, as both low and high states are ranges of values, not ideal 0V and 3.3V.
There is also a
diode AND gate. It may be simpler to implement. In this case, though, you should pay attention to the ranges of high inputs.
In either case the output may require amplification with either a transistor in common-emmiter configuration or a buffer, inverter or a Schmitt trigger.
Depending on the values your LDR sees in light and dark, you may not need to treat it as a logic signal source at all, but use it as a pull-up/down resistor for the signal from RCWL-0516.