Door open lightswitch for sliding closet doors
From a functional point of view, you want the two switches in parallel, normally-closed but held open when the door is in its closed position, so that if either door is open the switch closes and the light comes on. The switches may control the light directly or, if they are low-voltage switches, may control a relay which controls the light. (If you're using a relay, you can also potentially substitute a pair of normally-open switches in series; just use the inverted relay output.)

Mechanically... The switches I'd normally think of for this purpose either wouldn't be reliable or wouldn't be pretty. The best thought I've got is a low-voltage circuit, using alarm-style reed switches. These would involve switches mounted on the door frame with magnets mounted on the door edge nearest the frame. When the magnet is close enough, it pulls the reed in the switch out of its "normal" position. The advantage of these is that the magnets will tolerate a bit of gap rather than having to come directly in contact with the switches; how much gap depends on exactly which switch/magnet set you buy.

I could make it work... initially. Keeping it working, given how notorious these doors are for going out of alignment and slipping off their tracks, might be another matter.