Lugia is a decent physical wall in Ubers albeit generally outclassed by Cresselia. While Giratina also gives it competition, it does sport several advantages, which it should utilize as much as possible. First and most importantly, it receives an immediate recovery move in Roost and therefore isn't forced to use the less efficient Rest and Sleep Talk. It also doesn't have a weakness to Dragon-type attacks, allowing it to phaze Latias, Latios, and occasionally Rayquaza, without too many problems. Additionally, it is much faster and can use Ice Beam, which is generally a very effective move in Ubers.
Lugia is, above all else, a counter for physical Pokemon such as Groudon and Metagross; both Roost and Reflect aid its mission, with Roost as the critical recovery move and Reflect slicing physical damage in half. Whirlwind is another move geared towards stopping physical attackers. While Lugia is sturdy enough to take 72%-85% from even a Choice Band Groudon's Stone Edge, it can't keep up with a Choice Band Metagross's Meteor Mash or Life Orb Rayquaza's Outrage that is boosted multiple times. Therefore, it needs to remove the boosts by forcing the offending Pokemon to switch out. If used after one's own Forretress has set down Spikes or Stealth Rock, Whirlwind also works to inflict some residual damage upon the opponent.
As is often the case, the fourth slot involves a more complicated decision. For Lugia, viable options there include Toxic, Light Screen, and Ice Beam. Toxic is Lugia's best opportunity for any significant damage to Pokemon not weak to Ice-type moves, such as Darkrai and Mewtwo, and is usually the best of the three options; it is also excellent to ravage some of Lugia's targets, such as Rayquaza and Groudon. However, Toxic is utterly ineffective against Metagross and leaves Lugia with no offensive moves, leaving it a facile target for Taunt from Darkrai, Mewtwo, and others; also, all of Lugia's exertions may be rendered useless by a timely Blissey Aromatherapy. Considering Toxic's foibles and the fact that Toxic Spikes is quite popular on Uber teams, one may choose the next option, Light Screen. Although Lugia is predominantly a physical wall, it does have excellent base 154 Special Defense, and Light Screen capitalizes on that by essentially neutralizing its common weaknesses of Electric-, Ice-, Ghost-, and Dark-type attacks, and protecting it from Water- and Dragon-type attacks. Light Screen has the same issue as Toxic in that it leaves Lugia vulnerable to Taunt, though, and makes Lugia thoroughly incapable of inflicting any damage without field effects in place. Ice Beam is a proactive solution that will not deter Metagross, but hits super effectively on Groudon and Rayquaza. Unfortunately, the damage it inflicts is lackluster on anything else, and only has a 2.6% chance of OHKOing the standard Rayquaza even after one round of Life Orb damage.
Lugia may sometimes drop Whirlwind so that it may use both Ice Beam and Toxic. This allows it to deal quick damage to both Groudon and Rayquaza, while being able to inflict status on Mewtwo and Darkrai that think they can switch in believing that Lugia has Ice Beam and not Toxic. Toxic can act as a semi-phazing move as the opponent will not want to stay in to face the increasing poison damage, and unlike Whirlwind it can permanently cripple a Pokemon. However, without Whirlwind, Lugia does not have a quick answer to stat boosters and Baton Passers such as Ninjask.
A Timid nature with 192 Speed EVs is recommended for most walling Lugia, which translates into 334 Speed. This outruns all Pokemon up to the base 102 Speed bracket that have a Speed boosting nature, an incredibly important feat in Ubers; this is because Groudon, Garchomp, Rayquaza, Palkia, Kyogre, and Dialga, all frighteningly powerful attackers, exist at that level. However, Timid Lugia is OHKOed by a Dragon Danced, Life Orb boosted Outrage from Rayquaza after Stealth Rock damage. One also has the option to ignore Lugia's Speed stat in favor of its Defense and switch the nature from Timid to Bold, should he or she find the boosted Speed not helpful to the team as a whole. With it, a Dragon Danced, Life Orbed Outrage from Jolly Rayquaza maxes out at 72%, allowing Lugia to survive and deal a fatal blow with Ice Beam. The boosted Defense also allows it to wall Ho-Oh much more effectively.
Although Lugia has a phenomenal base 154 Special Defense, its main purpose is to wall physical attacks, and it is EVed as such, and thus it cannot compete with the massively powerful special attacks that are thrown about in Ubers territory. Lugia's Flying-type, while giving it many opportunities to switch into Ground-type attacks, causes it to attract loads of Electric- and Ice-type attacks, both of which are extremely common in the Ubers metagame, further destroying its chance of taking special hits. Therefore, it is best for you to pair Lugia with a Pokemon who has good Special Defense with which to take the Ice- and Electric-type attacks directed at Lugia. Blissey can take any of these attacks, but can't do much back to the perpetrator, barring status or Seismic Toss. Kyogre can take Ice Beams from any target. However, it is worth warning that Kyogre's Drizzle invites various Pokemon to unleash Thunder against Lugia once it switches back in.
Along with its massive base Special Defense, Lugia's base 110 Speed stat is often overlooked. This high base Speed stat allows it to outspeed certain threats, such as Rayquaza, Groudon, and non-Choice Scarf Garchomp, and hit them with a super effective Ice Beam before they can do more damage. As a result, inflicting Lugia with paralysis severely hampers its ability to wall normally. Pokemon like Blissey, Jirachi, and even some Groudon, such as support sets and the Paradancer set, can mitigate Lugia's walling abilities. A Groudon of your own can switch into Thunder Wave, as it is immune to the Electric-type status. It can also take a boosted Stone Edge directed at Lugia that usually accompany a ParaDancing Groudon.
Another massive threat to Lugia is Tyranitar, regardless of what set it chooses to run. Choice Band sets can severely damage Lugia with STAB Pursuit, should Lugia switch out, and it also has Crunch and Stone Edge should Lugia stay in. A Tyranitar with a combination of Taunt and Dragon Dance will completely shut down Lugia. Tyranitar can come in on one of your teammates and Dragon Dance as you switch to Lugia. With Taunt, it can prevent Lugia from Roosting or throwing up a Reflect, and then can wipe you out with its STAB moves, both of which are super effective against Lugia. Also, because of the sandstorm that Tyranitar sets up, its Special Defense is boosted, making Lugia's Ice Beams very ineffective against it. Lucario can accompany Lugia, as it has 4x resistances to both of Tyranitar's STAB attacks, and hits it for massive damage with STAB Close Combat, while Tyranitar can do little in return, barring a Fire Punch. Groudon, can also prove a useful partner, as it can take any attack Tyranitar can unleash upon it. Furthermore, its Drought ability diminishes the accuracy of Thunder, which can be extremely helpful, as Thunder-users are other threats to Lugia. Forretress can threaten Lugia, not because of its damage output, but rather because of the damage it can do to your team. While Forretress cannot do much to Lugia, Lugia cannot do much back, meaning Forretress can set up Spikes, Stealth Rock, or even Toxic Spikes with ease, all of which are annoying and difficult to deal with. Groudon with Fire Punch can deal with Forretress, as it brings the sun into play, boosting its Fire-type move. Also, a Forretress of your own can Spin away entry hazards.
Wobbuffet is another annoyance to Lugia, as it can turn it into utter set-up bait. However, sadly Wobbuffet has no counter, as you cannot switch out due to its ability, Shadow Tag. Lugia can use Whirlwind to scout potential Wobbuffet switch-ins, forcing it out, letting Lugia itself leave the battlefield before Wobbuffet comes back in. Lugia can also Whirlwind while Wobbuffet is in, but due to Whirlwind's negative priority, Wobbuffet's Encore will outspeed it and force Lugia to use its most recently used move (which could be Whirlwind). Wobbuffet can also be dealt with by using Toxic. While you are still trapped and potentially Encored, it will permanently cripple Wobbuffet, or even put it in KO range.