My daughter has battery-operated fairy lights in a mason jar in her room. They look very cute! (She just simply placed them in.)
30 DIY Mason Jar Fairy Lights – Fairy Glow Jars
Here is a video https://www.google.com/search?client=firefox-b-1-d&sxsrf=ALeKk004lzqk9dZQOH3jG1BV4qg2LJZTLg%3A1590886530592&ei=ggDTXofbI4u1ggejtob4BA&q=how+to+make+lights+in+mason+jars&oq=how+to+make+lights+in+mason+jars&gs_lcp=CgZwc3ktYWIQAzIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeMgYIABAWEB4yBggAEBYQHjIGCAAQFhAeOgQIABBHOgQIIxAnOgQIABBDOgUIABCRAjoCCAA6BQgAEIMBOgcIABAUEIcCOggIIRAWEB0QHjoICAAQCBANEB5Qg0hY5XRgoXZoAHABeACAAbYBiAGcHpIBBDYuMjaYAQCgAQGqAQdnd3Mtd2l6&sclient=psy-ab&ved=0ahUKEwiHpKKU8tzpAhWLmuAKHSObAU8Q4dUDCAs&uact=5#kpvalbx=_sgDTXsvkC_GHggeb0KSwDA31
You could use battery operated fairy lights
I see there are alot of very creative people out there making these decorative lights. Check out this link for info that may be helpful. https://www.pinterest.ca/pin/237142736605714904/
There are some good ideas here: http://theartinlife.com/index.php/2017/06/20/15-ideas-outdoor-mason-jar-lights/
Lots of different ideas
lots of ideas here https://www.pinterest.com/search/pins/?q=add%20led%20to%20mason%20jars%20diy&rs=typed&term_meta=add%7Ctyped&term_meta=led%7Ctyped&term_meta=to%7Ctyped&term_meta=mason%7Ctyped&term_meta=jars%7Ctyped&term_meta=diy%7Ctyped
Here is an idea: https://www.youtube.com/watch?v=QHjNxIgUVn4
Solar lights are also available. Here's a post that may help:
Amazon sells strings of lights that are attached to a cork top that you put in a wine bottle and has an on and off switch on the top.
It would be helpful if you asked your question in the form of a sentence or two on what you want to do.
I do this a lot, just put it in the jar and plug it in. I use a decorative cloth on top with a ribbon OR I buy an led battery operated light string and set it in and turn on the battery when I want it. Some people use solar powered landscape tops to light up their jars.