Strange data from arduino LDR sensor
This suggests you didn't properly connect it. I'll presume you have your LDR connected to ground and the series resistor that forms the divider to Vcc. If the value is zero, that would mean that the LDR's resistance is less than 1/1000th of the series resistor. That's possible. But then the 1023 isn't possible, because that would mean that the LDR's resistance is larger than 1000 times the series resistor, and LDR's don't have a > 1000 000 range between light and dark resistance.  

If you have a multimeter measure the LDR's dark and light resistance, and pick a series resistance in between those values. The series resistance goes between Vcc and tha ADC input, the LDR between the ADC input and ground.

edit
You say the pin was unconnected, and still you got this input variations. If you plot them out you get a perfect sine:  



It's not impossible that the ADC picked this up from the noise the mains radiate. The sine is much slower than the mains frequency, but that's an artifact you can get with subsampling.