How to detect if a GameObject is hit by a light
This depends on how accurate you wish to be.
The fast method would be to do a Vector3.Distance(light to obj), but that won't take shadows into account.
A slower method would be a single raycast from the object's pivot to the light, if it hits a collider in the middle, you would consider it in shadow.
Slower again would be casting a ray from the render-extent's points (ie, from all the corners of the bounding box), and you would then need to decide just how much light needs to be visible before you trigger (the bounding box has 8 points, if 3 of those come back blocked, is that hidden or not?).
Definitely check out the manual for Raycast area. You can cast quite a lot of rays per frame before you hurt performance, I cast about 6 per frame on an iPhone game with no apparent cost. There's also no reason that you would have to perform this check every frame, either.
A not-so-efficient way that considers shadow is projecting a ray from the light right into the position of the object you want to check, and, as said above, if the ray hits anything else than the collider you want, cinsider it in shadow.
you can use a trigger in size of your light if the light is a pointlight but if you are talking about other types you should trace a ray from the source to see if it's hitting or not. even advanced lighting/rendering computer programs do this but this is not a good idea to cast many rays in each frame so use triggers and colliders if possible.
in OnTriggerEnter you can check if there is something between them or not by tracing a few rays.
in unity and most other runtime applications all objects near the light source will be effected by the light even there is a wall between them. turn shadows off to see what i say.