By default, the Lightbox window in the Gallery module will show the image
title attribute's value if such attribute is being set.
The Lightbox window in the Gallery module will display the Image Title when an image is opened.
How to set the attributes for images that have been already uploaded
Go to WordPress Dashboard → Media → Libary
Click on any Image.
Ensure that both the Alt Text and Title Text are set.