This example code reads the analog value of the LDR and convert it into milliVolts. Then it shows the result on a LCD. 

/*
project name : atm328 - ldr lcd
Version : 1.1
Website : www,avrprojects.net
Date Created : 29.03.2015
Target : ATmega328P microcontroller
Language : C WINAVR
Hardware : LCD display 2*16, ATM328 board
Description : reading analog value of the LDR nad disply it on LCD.
*/

// INCLUDES
#include <avr/io.h>
#include <stdlib.h>
#include <util/delay.h>
#include <lcd.h>

// this function read the value of ADC channel 0
unsigned int read_adc(void)
{
ADCSRA |= 1<<ADSC; //start conversion;
while (ADCSRA&(1<<ADSC)); //wait conversion end
{
return ADCW;
}
}

int main(void)
{
//adc init
ADMUX = 0b00000000; // set ADC0
ADCSRA = 0b10000110; //set ADEN, precale by 64
LCD_init();
LCDgoto(0,0);LCDtext ("LDR Light Sensor");

while(1)
{
unsigned int rawdata = read_adc();
float millivolts= (rawdata/1024.0) * 5000;
LCDgoto(0,1);
if (millivolts < 1000) {
LCDtext(" ");LCDint(millivolts);LCDtext(" mV ");
} else {
LCDint(millivolts);LCDtext(" mV ");
}
if (millivolts < 1250) {
LCDtext("= Dark ");
} else if (millivolts < 2500) {
LCDtext("= Dim ");
} else if (millivolts < 3750) {
LCDtext("= Light ");
} else {
LCDtext("= Bright");
}
_delay_ms(250);
}
}