In 2371, when USS Voyager came across a protostar, Captain Kathryn Janeway had samples of photonic matter beamed aboard for study. In fact, Voyager had inadvertently captured photonic lifeforms native to the star. As a result, the others of their kind manifested in the Beowulf holodeck program, which was running at the time, as Grendel.
"Grendel" then proceeded to abduct Harry Kim, Chakotay, and Tuvok in retaliation, converting them to energy and storing them in their photonic lattice. They were returned after The Doctor offered Grendel the remaining photonic matter that Voyager had collected. (VOY: "Heroes and Demons")