光 refers to the natural light which is relatively strong like the sun light.
あかり(明かり／灯かり) refers to a light relatively weak and soft (dim) like that of a candle. あかり also tends to be used for an artificial light like that of a lamp.
for example, for the moon light we can say 月の光 and 月明かり too. 月の光 implies that the light is relatively strong and white, whereas 月明かり implies that the light is relatively weak and dim.
hope this helps :)