Furthermore, Solgaleo and Lunala evolve from Cosmoem and can create Ultra Wormholes. With the power of both Pokémon, they can create Cosmog. When grouped with their pre-evolutions, they are also referred to as the Cosmog line. Necrozma can create Ultra Wormholes as well. The trio is well known for having brought light into Alola when it was born and the creation of Z-Moves.
Solgaleo and Lunala were introduced as the mascots in the first Generation VII core games, Pokémon Sun and Moon, and two forms of Necrozma were the mascots for the second Generation VII core games. Solgaleo is an emissary of the sun known as the "beast that devours the sun". Lunala is an emissary of the moon known as the "beast that calls the moon". According to Pokédex entries, Solgaleo and Lunala are said to be, respectively, the male and female evolutions of Cosmog. However, the gender of both are actually considered unknown by the games. Necrozma, the third member of the trio, actively seeks out the other two in order to steal the light they possess, which will allow it to regain its true form, Ultra Necrozma. When Necrozma steals the light of Solgaleo or Lunala, it becomes Dusk Mane Necrozma or Dawn Wings Necrozma, respectively, which, through the Ultranecrozium Z and the Ultra Burst transformation, can become Ultra Necrozma.
In ancient times, Necrozma was referred to as the "Blinding One" who once shared its light across Ultra Space and Alola. Z-Moves were created from this light along with the aura that surrounds Totem Pokémon. However, the residents of Ultra Megalopolis attempted to gain control of Necrozma in order to recreate the light it shares. As a result, Necrozma was permanently crippled, transforming into a crystalline body while experiencing constant pain. Pieces of its original body rained down onto Alola in the form of Sparkling Stones, which would result in the creation of the Z-Power Ring. Necrozma attempted to return to its original form by stealing all of the light from Ultra Megalopolis, leaving it covered in darkness. In response, the residents locked Necrozma in the Megalo Tower in order to prevent it from escaping.
According to secret notes found in the Malie Library, Necrozma at one point invaded Alola, stealing all of its light, covering the region in darkness as a result. SolgaleoUS/LunalaUM, along with the Guardian deities, fought together against Necrozma at the Tapu Village to recover the stolen light. Necrozma then defeated and absorbed the Legendary Pokémon to become Dusk ManeUS/Dawn WingsUM Necrozma. A youth, along with the Guardian deities, used the power of the Z-Crystals and Sparkling Stones to free SolgaleoUS/LunalaUM from Necrozma, who was then banished from Alola. At as a result of its actions, Necrozma was called the "Pillager of Light" by the ancient king of Alola, who ordered that all books mentioning Necrozma were to be burned to prevent further panic. However, not all was destroyed.
Solgaleo's signature move is Sunsteel Strike, a damage-dealing Steel-type move that ignores the target's ability. Lunala's signature move is Moongeist Beam, a damage-dealing Ghost-type move that ignores the target's ability. For the duration of these moves or when using their special powers, Solgaleo and Lunala change into their Radiant Sun phase and Full Moon phase, respectively. Necrozma's signature moves are Photon Geyser, a damage-dealing Psychic-type move that ignores the target's ability which also varies between physical attack and special attack depending on which of the stats is highest and Prismatic Laser, the highest base power damage-dealing Psychic-type move. When Necrozma merges with Solgaleo or Lunala, it can use the signature move and signature Z-Move of the Pokémon it merged with. When it attacks in its base form, part of Necrozma's body glows white.
All three have a signature Z-Move that ignores the target's ability.
In Pokémon Sun and Moon, Lillie takes care of a Cosmog named Nebby, which she fled from Aether Paradise with in order to save it from the Aether Foundation's experiments. Lillie keeps Nebby in a bag as an attempt to both keep it safe and to keep it from sight. Lillie and Nebby are eventually kidnapped by the Aether Foundation, and Lusamine takes Nebby and uses it to open Ultra Wormholes. Nebby then evolves into Cosmoem. Later, when the player and Lillie play the Sun and Moon Flutes at Altar of the SunneS/Altar of the MooneM, Nebby evolves into SolgaleoS or LunalaM, which is then caught by the player.