It looks somehow pained as it rages around in search of light, which serves as its energy. It’s apparently from another world.
– Pokémon Ultra Sun Pokédex
Necrozma appeared in Sun / Moon, but almost as an afterthought with no story to it. The story of Necrozma is fleshed out in Ultra Sun / Ultra Moon.
It has a unique ability, Prism Armor. It has the same effect as Solid Rock and Filter, in that it reduces damage for Super Effective moves. However, unlike Solid Rock and Filter, Prism Armor is not ignored by the abilities Mold Breaker, Teravolt, and Turboblaze.
Necrozma also has a new move, Prismatic Laser, which is a 2-turn move like Hyper Beam. It has 160 base power.
Stat-wise, normal Necrozma actually has lower base stat total than other legendaries like Solgaleo, Lunala, Mewtwo, Ho-oh etc, at only 600 instead of 680. However, it gets 680 BST when it merges with Solgaleo and Lunala.