Since lightsabers give off a visible glow, I could see a Jedi or a Sith using their lightsaber as a lighting source. They were already used as tools (at least in Episode I) so there are some non-violent uses to a lightsaber. Has any Jedi or Sith used their lightsaber in this manner in canon works?
In Star Wars the Clone Wars, Series 2 episode seven, "Legacy Of Terror" Anakin and Obi-Wan use their lightsabers to give off light when they are descending into the catacombs. The Clone Troopers who accompany them use in-built lights on their helmets.
Yes. In the new Disney canon novel "Heir to the Jedi", Luke uses his lightsaber in a tunnel as a light source after some creature ate Luke's lamp.
“Stay back!” I warned Drusil as I heard the creature choke and spit up the lamp. It wasn’t working anymore—maybe it was simply in the off position rather than broken, but I wasn’t about to search in the dark for it in the bottom of a sewer with something hungry nearby. We needed to see, so I pulled my lightsaber from my belt and hoped it would give off enough ambient light to spot the creature before it attacked again. Holding it in front of me in a defensive stance, I turned it on as I heard the creature snarl and thrash in the filth. The blue plasma blade bloomed up and my eyes, dilated in the darkness, saw the thing open its mouth and bunch its powerful back legs for a spring at my throat.
Obi-Wan does just that in the Revenge of the Sith novelisation, right after he is attacked by his clone troops.
Some undefinable time later, Obi-Wan felt his head and shoulders breach the surface of the lightless ocean. He unclipped his lightsaber and raised it over his head. In its blue glow he could see that he had come up in a large grotto; holding the lightsaber high, he tucked away his rebreather and sidestroked across the current to a rock outcropping that was rugged enough to offer handholds. He pulled himself out of the water.
Rey also does it in The Rise of Skywalker, after falling into some sinking sands.
When Luke is being tested by Yoda at the tree of the Dark Side, he lights his saber as he enters the tunnel. I always assumed it was in order to see by its light.
This is supported by the official novelization as mentioned by Valorum.
He held his glowing sword in front of him and noticed an object on the cave floor. Pointing his lightsaber downward, Luke illuminated a black, shiny beetle the size of his hand. In an instant, the thing scurried up the slimy wall to join a cluster of its mates.