4051 Analog Mux not working with photocells

It might be a good idea if you try to meassure the actual voltage at the central leg of each of the voltage dividers and change the amout of light that reaches the LDR's

If the variation is actually very small your software might be ok, and there might be a problem with the LDR's or the realtion between the LDr's resistance and the fixed resistance in the voltage dividers.