That’s a difficult question to answer for certain, anonymous. Part of the reason why is because “legendary pokémon” is a term that applies to a wide variety of different species, some a little more powerful than others. The other part, of course, is because there are some legendaries no one has ever caught, so we can’t entirely run tests to figure this out.
Among the more terrestrial legendaries, all of the ones we’ve been able to study are indeed extremely mortal. For example, the latias and latios of Alto Mare are perfectly capable of dying, and there have been records in recent times of at least one of them doing so. Likewise, some legendaries are either sensitive or connected to their native elements. Celebi’s health in particular is said to be connected to the forest it guards, although its temporal abilities make it difficult to kill.
Once you get into more otherworldly legendaries, it really depends on whom you ask. The people of Johto, for example, believe that all of its legendaries can and do die, as evidenced by our stories of Celebi and the three legendary beasts. (The beasts were resurrected, yes, but that doesn’t mean they can’t die again.) Technically, we don’t really talk about death beyond that because it doesn’t concern us as much, but many of us—myself included, should you be asking for my personal opinion—believe in a certain reincarnation cycle of which Ho-oh is the embodiment. The story of the beasts, in fact, is really more or less a metaphor of this concept, where terrestrial beings become spirits or the embodiments of nature. Therefore, once the legends die, many of them will shed their mortal forms and live on in spiritual forms. The only exception is Ho-oh, which dies and is reborn over and over again.
By contrast, Sinnohans, our spiritual cousins, believe that Arceus is the infinite and perfect creator of the universe and thus incapable of dying (else the universe goes with it). Dialga, Palkia, and Giratina are said to share this quality, as all three of them are really embodiments of different facets of the universe. The others, however, are very much mortal and can die and become spirits, just as Johtonian legends can.
Then you have the Western followings. Kalos believes that its legends do not die but rather enter periods of dormancy, whereas Unova, which does not worship pokémon at all, is rather divided on the subject. (Reshiram, Zekrom, Kyurem, and Victini are said to be able to enter dormant states, but the others are perfectly mortal.)
In short, no one really knows the answer to this question, anonymous, but many of us have an answer. Which one you believe is true really depends on what you follow on a spiritual level. Should you be atheist, however, it may be worth it to note that all legendaries are physical. They’re beings of flesh and blood (or some equivalent thereof, in any case), and thus, very likely, they can be killed.