Code & schematic seems that they would work.
Suggestions:
- You don't really need Q1 since the MOSFET has a VGS(TH) of max 4v - under the 5v of your arduino.
- You want to implement logic to avoid flickering - Imagine that the readings for the cell are 399 400 398 401 398 400 401 etc either because of noise or because your light is indirectly illuminating your sensor. So implement something like if < 350 turn_off if > 450 turn_on, etc ...
- Also code could be written nicer but you probably don't care
.
This would (probably) work for 2A too, but I would get a better MOSFTET for that - IRF630 will end up dissipating 2W because of the 0.5R RDS(ON).
The probably is because of hopefully the 2A load doesn't share ground with the 12V power supply.