Well, can be done in some different ways ..... the more easy way is use a photodiode (or a photoresistor, also if they are less precise, but for this use can be good the same), in the current regulation branch of the driver (usually for this type of applications you use drivers with an op-amp for control the current ..... regardless if current sinks or sources) ..... the photoresistor must be placed in the feedback circuit in the way that, when the light increase (and the resistance decrease), it reduce proportionally the reference voltage, so the op-amp automatically try to compensate decreasing the current for the LD, til the equilibre is re-established ..... and, ofcourse, when the light decrease, it works in the opposite sense ..... not the state-of-the-art application, but it's the more simple possible .....
An alternative, can be use it through a second op-amp, that acts on the reference net ..... this gives you better stability and range, but ofcourse it complicates a bit the circuitry .....
Can also be done with a pair of transistors, but not for high current units .....