WELL, realtime shadows are more common in 3D, and even then they are kind of baked into the game, not calculated in realtime. But mostly in 2D you generally do not work with big dynamic lights, instead you will normally use fake lighting, using tint or LUTs to the landscape, to make it night, use a bluewish dark tone, and sunset, orange-yellow. The light itself could be a ambient tint colored rectagle on top of your world, multiplying your colors or tinting them.
The shadows could be 2d copies of the sprites, squished down and inverted on the y axis, distorted in a angle, to make it look like the sun is rotating around the objects. I don't think using a big light to create dynamic shadows will ever be optmized and keep a nice FPs, unless it's 2.5D, but that's way overkill in my opinion, unless you know what you are doing.
This idea I mentioned is easily understood here, but keep in mind it's a different engine:
Here's a game that uses this technique: (check for 3:00 and 9:00 timestamp to see what I mean)
Here in this discussion there is some information as well,
I don't know the graphics you are going for, a screeshot would be nice. Shadow is a complex thing in 2d games, search on google and notice how other games did it as a reference.