Hello there!
I am trying to turn the back light on an i2c LCD with the following code:
#include <LiquidCrystal_I2C.h>
lcd.begin(); // this is to initialize the lcd
lcd.backlight(); // this is to open the backlight of the lcd
but I am not having any success! Please let me know what I am doing wrong and what I should be doing instead. Thank you in advance!
Do you know if it's working at all? Will "hello world" work"? It should be in the examples.
A schematic would be nice especially if there is other hardware connected. Your code as shown is doing exactly what it should do, nothing. Post the full program following forum guidelines.
The popular I2C backpack on those LCDs has a jumper that enables the backlight.

Is the jumper in place?
Another OP "missing in action". Let's hope he comes back tomorrow.
Thank you to all who tried to help me.
I tried the LCD using it with the 4 bit wiring arrangement and the backlight did not work!
Therefore I think that this particular LCD does not work!
The LCD and i2c backpacks are pretty robust. Failures are not very common.
i.e. most of the time the issue is not related to broken LCD or backpack h/w.
Most issues encountered are related to using an incorrect i2c address or wiring/soldering issues.
With the LiquidCrystal_I2C library issues can show up from using the incorrect i2c address, or having a backpack that is not supported by the library.
My suggestion would be to install the hd44780 library (available in the IDE library manager) then run the included I2CexpDiag sketch for the hd44780_I2Cexp i/o class.
It will run diagnostic tests and report any issues it finds.
Keep in mind that there are multiple backpack designs and the LiquidCrystal_I2C library is hardcoded to 1 design (the most common). If you end up with a backpack that is different than what LiquidCrystal_I2C is hard-coded for, things will not work properly.
The hd44780 library hd44780_I2Cexp i/o class auto detects the i2c address backpack design so it should work all the designs out there.
Here is a link to the hd44780 library wiki:
Here is a link to the hd44780_I2Cexp i/o class wiki for more information about the i/o class: