Photo switch / transistor - any suggestions?

Wouldn't it be just easier to use a small avr?