Hi,
Maybe something like this:
Create a sphere, set the radius on the desired size, set 'Is Trigger' and set it on the position where you want it to trigger (when the light need to start doing something)
Now you can remove the mesh or disable it. and you can set it as child on the light object if you want it to move together.
next, make an fsm
have a state with a trigger event and set on trigger enter, and you can store the object.
on the next state have a get distance(every frame enabled) and a on trigger exit.
Then you might need to multiple or divide that depending on your light intensity you want (for example your max intensity would be 20, and max distance 10, then you would need to multiply by 2)
after that you need use a float operator and then do 'max intensity' minus 'distance'
That result you can use to set the intensity.