Pokemon Lunala has a base Atk stat of 255 and is of the Psychic/Ghost type. Its movepool includes Future Sight, Air Slash, Psychic, Shadow Ball, Confusion, and Air Slash.
Pokemon Solgaleo has a base Atk stat of 255 and is of the Psychic/Steel type. Zen Headbutt, Fire Spin, Iron Head, Psychic Fangs, Flamethrower, and Solar Beam are some of the moves in its movepool.
In the Ultra League, Solgaleo has a solid enough record that it might be worth taking into account for variety or enjoyment.
Which is better Solgaleo or Lunala?
In Pokemon GO, Solgaleo and Lunala are equal in strength. Both aren’t particularly strong for Raiding or the GO Battle League despite being almost identical (Solgaleo is a Psychic/Steel-type while Lunala is a Psychic/Ghost-type).
As far as an attack, defence, endurance, and maximum CP are concerned, Solgaleo and Lunala are identical. This makes choosing between them when evolving Cosmoem in Pokemon GO exceedingly difficult.
Therefore, feel free to select the evolution of Solgaleo or Lunala that you prefer when evolving Cosmeoem.