Interfacing accelerometer LSM303DLH with Arduino UNO using I2C
Are you using one module bought from Adafruit?

Make sure the connection is correct between the sensor and Arduino, then make sure that the script doesn’t get stuck when the Wire is begun.

Another thing that you need to make sure, is to have the correct address, it depends from board and each one can have a different one or a selector.

This can be helpful to figure out what the wiring is