Cadmium Sulphide light dependent resistors exist, as do solar cells. Many people have designed solar trackers for use with solar cells. Some are probably available at the retail level (off the shelf).
As for rain, detecting water seems so simple that I'm afraid of insulting you by telling you to use electricity.
We did rain detection on an orchard with a pair of hair clips spaced a cm apart on a leaf. The clips were a series circuit with a resistor. Conduction (lower voltage across the clips) meant rain.