The photoresistor is a simple two-terminal passive component and has no polarity – it does not matter which way round you place it in the circuit.
Programming the Arduino
To check that everything is functioning correctly, you can create a basic sketch that reads the voltage level and outputs the value to the serial port. By covering the photoresistor you will see this reading change.
To create the voltmeter sketch: