The Lightning is the Imperial Navy's premiere air superiority fighter, with agility unmatched by any other Imperial flyer thanks to its distinctive forward-swept wings. Though its primary weapons are a long-barreled autocannon and twin-linked lascannons for engaging enemy aircraft, it can be fitted with one of several varieties of missiles and bombs to specialize in anti-armor, anti-infantry, or anti-air operations.
Apparently, the STC data for the Lightning was discovered during the Saint-Saen Crusade, which liberated twelve worlds in Segmentum Obscurus. They were found on Karnak II by an Adeptus Mechanicus Explorator team and the designs were immediately given to the Mechanicus Lords of Cypra Mundi. It would take over five hundred years of research and trials, including readings of the Emperor's Tarot and cross-referencing with the archives of Mars, before the designs were finally approved for production in supplying fleet carriers and cruisers of Battlefleet Obscurus. Since then the designs have slowly been disseminated to the Navy worlds of Bakka and Hydraphur and Lightnings are now commonly seen alongside the Thunderbolt in both Segmentum Tempestus and Segmentum Pacificus.
As aforementioned, the main role of the Lightning was as an air superiority fighter, but it was quite the versatile plane, with a secondary mission of providing air escort for Marauder Bombers. For this reason, they are often based on orbiting ships or forward air bases, where their rocket booster allows them to quickly take off and engage enemy air forces. Ground-based Lightnings can also benefit from hydraulic "fast-launch" ramps which, in combination with their rocket booster engine, provides better acceleration and faster take-off time than conventional VTOL craft.
In December 2012, Forge World retired the old Lightning model and released a more advanced-looking "Voss Pattern" Lightning Strike Fighter (Also called the Primaris Lightning Strike Fighter). It features slightly sturdier-looking wings, a beefier, single engine intake, and a more streamlined nose (especially compared to the goofy "headlights" of the original). It is normally equipped with a potent armament of twin-linked Lascannons and six Hellstrike Missiles or Rad Missiles.
It uses plasma engines, allowing it to not bother with a big ass (literally) rocket and therefore should also go much faster due to the difference in weight as well as simply having far more powerful engines which also allow for it to function just as capably in space as in atmosphere. As usual, Voss-pattern whatever is made of common sense (wonder why they haven't been met with exterminatus yet). Consequently enough, they were mainly encountered during the Great Crusade and the Horus Heresy, and even at the time of its introduction, the pattern proved extremely costly to produce and could only be handled by the most experienced pilots.
Funnily enough, despite its sensible costume, the Voss Pattern is actually a worse design than the original Lightning. Its wings have been moved forward, which consequently has moved its center of lift forward, while the majority of the airframe has stayed the same. This would likely move the centre of lift ahead of the centre of mass, leading to an incredibly unstable craft with a tendency to flip itself ass-forwards and spin out of control. Of course, this is 40k we’re talking about, so all of these concerns can be explained with the words ”space magic”.
The 'Strike' variant Lightning has the same airframe, but with more missiles or bombs instead of the underslung autocannon. In effect, the Lightning Strike has been modified to fulfil a ground-attack role.
As aforementioned, the main difference between the Strike variant and the original is its weapons loadout. While it retains the twin-linked Lascannons mounted on the wingtips, the Strike removes the long-barreled ventral-mounted autocannon for two additional hardpoints, which carry either two Hellstrike Missiles or two Bombs. It also retains the four wing hardpoints, allowing it to carry four additional Hellstrikes or bombs, four Hellfury Missiles or six Skystrike Missiles. Like the normal Lightning, it can also mount additional equipment.
Lightning Strikes are used purely for dedicated ground attacks, primarily targeting enemy armour formations. During major operations in conjunction with the Imperial Guard, a 'taxi rank' of Lightnings will circle the battlefield awaiting requests from Guard commanders for assistance. Once received, the Lightning Strike will then swoop down on the enemy target and destroy it before climbing back into the rank to await the next request.
Forward-swept wings have been tried on real experimental aircraft, and they do confer some benefits, like enhanced maneuverability, improved airflow and the possibility of a more compact airframe. It also comes with the drawbacks of instability (though modern avionics can make the minute corrections required to keep the aircraft steady) and a risk of the wings twisting themselves to pieces at high speeds. These issues meant that it took about 50 years from the idea's conception before prototype high-performance fighter aircraft with forward-swept wings could be built (the Grumman X-29 in 1984, and the Sukhoi Su-47 in 1997, and both of those ended up being scrapped anyway). For comparison, it took the Adeptus Mechanicus over five hundred years to fix these issues in the Lightning, and they didn't even come up with the idea themselves -- they had to find the STC first. On the flipside, the people who were trying to fix them were probably being shot at by their own colleagues, so it's rather notable they managed to fix them at all. On the other hand, Imperial aircraft doubtless work using gravitational and inertia manipulation along with the commonly mentioned vectored thrust. So, the shape of the wings is irrelevant.