vier:
You can use two laser pointers and two ldr resistors.
Don't use LDRs (light dependent resistors) for this; they don't react quickly enough for something fast and small like a ball. A phototransistor/photodiode of some type is definitely preferred.