I don't understand the question. Are you asking when humans figured out what light was and how it interacts with objects?
If you're asking "when did humans learn a shadow meant something was blocking a light source" the answer is surely prehistoric--probably prehuman. Non human animals know that a shadow passing overhead means that something--possibly a predatory bird--is above them blocking the sun. Many small animals like lizards and rodents have evolved to reflexively flee if a sudden shadow passes over them for this exact reason.