Best way to change a value between render layers?
I don't think there is any way to know the name of the render layer currently being rendered, which means you can't use a driver or app.handler to calculate a property that varies by render layer.

We can however, render one layer at a time, this allows us to control which layer is being rendered and to alter properties before starting to render a layer.

As an example, we can set a text object to the layer name.

import bpy

for l in bpy.context.scene.render.layers:
    bpy.data.objects['Text'].data.body = l.name
    bpy.ops.render.render(layer=l.name)


Note that rendering a single layer doesn't work when rendering an animation, which means you would need another loop to render multiple frames.