(written from a Production point of view)
There have been several behind-the-scenes references to the Peter Pan stories in relation to Star Trek.
In the penultimate scene of Star Trek VI: The Undiscovered Country, when Pavel Chekov asks James T. Kirk where the next course will be, Kirk responds, "Second star to the right... and straight on 'til morning." The film's director, Nicholas Meyer, stated, "The idea for the quotation, to put it more obliquely, is from Peter Pan." (audio commentary, Star Trek VI: The Undiscovered Country Special Edition DVD/Blu-ray) Kirk actor William Shatner recalled, "Somebody had a great idea, it had to be Nick, to put the line from Peter Pan in at the end [....] I tried to inject, to have colors of Peter Pan, and the eternal youth of looking for and being awed and wondrous about the universe." ("Farewell & Goodbye", Star Trek VI: The Undiscovered Country (Blu-ray) special features) In her reference book Quotable Star Trek (p. 311), Jill Sherwin cited the source of the quote as "J.M. Barrie, Peter Pan". However, the quote is actually from the Walt Disney animated film adaptation of Peter Pan, in which it is said by Peter to Wendy. A similar line was in Barrie's book on which that film was based, Peter and Wendy: "Second to the right. And straight on 'til morning." Neither version is directly cited in Star Trek VI.
The same quote had also been used in a few other Star Trek works. In Star Trek: The Motion Picture - Handbook of Production Information, the goal of making Star Trek: The Motion Picture was said to be "to dazzle the senses, to make visions soar. To make possible that journey to the second star to the right, straight on until morning." In the penultimate scene from the script for Star Trek II: The Wrath of Khan, Kirk told Saavik, "Lieutenant, new course: 'Second star to the right and straight on till morning.'"  Although the line didn't make the final cut of that film, it appears in the film's novelization, written by Vonda N. McIntyre.
In the reference book The Star Trek Compendium (4th ed., p. 42), TOS: "Miri" is likened to Peter Pan, with the characters of Jahn, Miri, and the Onlies said to symbolize Peter Pan, Wendy, and the Lost Boys, respectively.
Star Trek guest stars Charlie Brill and John Schuck have both featured in stage productions of Peter Pan. (Star Trek: The Official Fan Club Magazine issue 72, p. 9; Star Trek: The Official Fan Club Magazine issue 54, p. 23) Star Trek: The Animated Series Director Hal Sutherland worked on an animated version of Peter Pan.