For this simple project it would probably even be easier to write the pwm yoursels instead of figuring out how to use the pwm modulle. Anyway I'm assuming your a beginner in the world of micro controllers. I can give you a piece of advice that will really help you with reaching your goal. Read the datasheet, read the datasheet again and then read it some more
. Trust me PIC's have really good datasheets, but can be cumbersome to read for a beginner. You will need to figure out the ADC to measure the ldr sensor and the pwm modulle, and also need to add some very minimal "glue" C code. You can use of of the timer blocks as pwm modulle, I doubt they will actually be called PWM modulle in the datasheet.
If you're stuck with your code, just post it here!