These are two that are actually less mixed up than they used to be. Affect is to affect something, while one thing has an effect on another.
Rusty was affected by the dog that moved into the house.
Rusty made an effect on the dog when she smacked him on the nose.
The effect of the lights in my eyes is to blind me.
I’m affected by strong lighting.