Eftersom din fråga är specifik för ST: TNG och Enterprise D, följer följande från länk svarar din fråga i sin helhet.
Designer Andrew Probert came up with the concept of the captain's yacht while designing the USS Enterprise-D.
Although it was never seen in use, it was labeled on the master systems display screen in main engineering and on Commander William Riker's bridge console ("New Ground"), docked at the bottom of the saucer section almost directly opposite the main bridge.
Probert suggested possible ways for the yacht to be used during the first season, including not showing the yacht but mentioning it in dialogue, but his ideas were rejected. The Star Trek: The Next Generation Technical Manual (p. 164) claims that the producers almost used the yacht in TNG: "Samaritan Snare", but decided to use an "executive shuttlecraft" due to budgetary constraints.
According to Patrick Stewart, the yacht would have been called Calypso. (Star Trek: The Next Generation Technical Manual, p. 164)
Vi fick inte se en kapten yacht i aktion tills Star Trek: Insurrection