minetest.get node light

Description
Returns the node light level (0...15) at the given position at timeofday. If  is   then the current time is used.

This function returns the light value "inside" of the node at given position. So if you need to get the light value ontop of target node you need to get the light value of position above the target.