A photon is an elementary particle responsible for the transmission of electromagnetic energy. Photons were used by a number of cultures in a variety of technologies, including weapons, dilithium recrystallization, and holography.
Holograms functioned by utilizing projected photons, held together by force fields, in order to imbue the image with physical reality. One of the earliest examples of this technology encountered by Starfleet was the Xyrillian holographic chamber, which utilized resequenced photons to create physical objects. (Star Trek: Insurrection; ENT: "Unexpected"; VOY: "Lifesigns")
After traveling back in time from 2286 to the late-20th century in a stolen Klingon Bird-of-Prey, Spock conceived of a method whereby the dilithium crystals, which had been drained by the time travel, could be recrystalized by injecting high-energy photons, created as a byproduct of nuclear fission, into the dilithium chamber. The photons were covertly collected by Chekov and Uhura, who snuck aboard a naval vessel, which utilized nuclear power. (Star Trek IV: The Voyage Home)
In 2368, Commander William T. Riker and the J'naii scientist Soren used a series of photon pulses fired from two type 4 phasers, with which their shuttlecraft had been fitted, to chart the outline of a null space pocket into which a J'naii shuttle had disappeared. They were able to successfully map the perimeter of the pocket by charting where each pulse disappeared into the null space. Photon pulses were also used as offensive weapons by the Entharans, a species native to the Delta Quadrant. In 2374, Kovin, an Entharan weapons dealer, fired a spread of photon pulses at the pursuing USS Voyager, reducing Voyager's shields to eighty-two percent. (TNG: "The Outcast"; VOY: "Retrospect")
In 2371, Captain Janeway suggested detonating a field of photon charges between USS Voyager and a space-dwelling lifeform which had been attacking the ship. Commander Chakotay, however, suggested using a non-aggressive tactic. (VOY: "Elogium")
In 2373, Voyager initiated a series of photon bursts to create three lights in the sky of the planet in a Delta Quadrant, in an attempt to convince the locals that a prophecy was being fulfilled. This allowed them to transport two Ferengi, who were posing as gods to the primitive inhabitants, to be beamed away, while staying within the bounds of the Prime Directive. (VOY: "False Profits")