Night, or nighttime, was the period of time when the sun is below the horizon, with the middle being called midnight. The opposite of night was day, or daytime, and often lasted a similar length of time as the night. On a planet, moon, or other celestial body the start and end times of night varied based on factors such as season, latitude, longitude, timezone and planet size.Day and night existed due to the rotation of celestial bodies about their planetary axis. While standing on the world, this created the illusion of the sun rising and setting. Because each planet spun at a different rate, each length of night varied in length. Some planets and moons were tidally locked, and rotated exactly once per orbit, having a permanent night side and day side, such as Remus or Daled IV. Rogue planets, such as Dakala or the First Founders' homeworld, were permanently at night because they had no sun.
Night time was often the time for rituals not performed during the day on various worlds. On Earth, nighttime was the preferred time of day for campfires. James T. Kirk, Spock, and Leonard McCoy took shore leave and spent some of their time around a campfire at night in Yosemite National Park, where the three discussed their time together and philosophized about life and death around a pot of whiskey-spiked baked beans. (Star Trek V: The Final Frontier)
On Bajor every year, the Sirah used a small fragment of an Orb from the Celestial Temple to create the Dal'Rok, which would then threaten the village for five nights. The purpose of creating the Dal'Rok was to unite the villagers against a common foe. (DS9: "The Storyteller")
The holonovel, Beowulf, "an emulation of an ancient English epic set in 6th century Denmark" as described by Chakotay, detailed a town that was visited by mysterious creatures every night. (VOY: "Heroes and Demons")