I know this has a BA, but I think it has a more reasonable reason to be explained.
Lugia is the guardian of the sea. And the moon 'guards' the sea with ebb and flow. You can say the Moon is a form of Psychic things. Like Lunatone and most Pokémon from space are Psychic type.
Now the Flying type. I found finding this a lil' bit tricky,
>Lugia leads the legendary birds. When they fight over territory, Lugia is the only Pokémon that can quell their ceaseless fighting, as observed in the second Pokémon movie. Much like the birds, it possesses the ability to control the weather; most notably, it can calm and give rise to storms. It is said that a light flutter of its wings is capable of causing winds powerful enough to tear down cliffs. If it were to flap its wings, it could hypothetically spawn storms lasting as long as 40 days. It is highly intelligent, and because of the devastating power it could accidentally inflict, it isolates itself deep underwater and tends to sleep in solitude. Lugia is the only known Pokémon that learns Aeroblast. It is extremely rare and is hardly ever seen.
Source
So: Ability to control weather (probably because it's flaps from it's wings), light flutters of it wings air can tear cliffs down(fricking flaps = fricken powerful air). Can make a storm as long as 40 days(fricken powerful air again). Highly intelligent (Psychic + birds are intelligent)
- Something from Morimoto Shigeki:
>To start, the first type was decided to be Flying-type since Lugia have wings. At the time Psychic-type was the symbol of powerful Pokemon. As we wanted Lugia to give the impression of being a powerful Pokemon, we settled on Psychic-type for the second type, instead of Water-type.
>In short, the reason why Lugia is not a Water-type despite being underwater, is due to its Flying-type-like appearance, and Psychic-type being the symbol of a powerful Pokemon.
>Legendary duos represent opposite concepts, for example Groudon and Kyogre represent land and water, while Dialga and Palkia represent time and space. In the case of Ho-oh and Lugia, although they do not have a direct connection in the story, we imagine that they represent the sun and the moon, day and night, yin and yang (positive and negative), bottom of the sea and the sky, above and below.
>Ho-oh and Lugia were born in the world of Pokemon Gold and Silver, for the new feature, time system, gave us day and night cycle. Thus, they represent the sun and the moon, day and night.
(also Ho-Oh was intended to be in gen 1. So you can't blame Ho-Oh for being a fire type)
Source