R2 will limit the current to the 24V lamp to the extent that it may not light up - what current does that lamp need? This is a parameter you still haven't specified and which is of course crucial for the overall design.
Is there any reason to connect the switch to 24V? It would make your life a lot easier to connect one side of the switch to the GND and the other side to the Arduino pin. No further components or wires needed.