I think air travel is almost certainly safer on a global level, though of course that is likely using a per distance measure, and it may be different if measured per journey.
Air travel is hard to compare because it consists of a potentially fairly dangerous bit, a long distance in great safety then another potentially fairly dangerous bit.
Air travel is safer than rail on a global per/km basis partly because rail safety in some third world (and even first world) nations is appalling, and it skews the data. OTOH even third world airlines must meet international safety standards if they are to fly beyond their borders. It is also because, as Bletchleyite says, air flights are generally much longer than rail journeys and the mid-flight danger is relatively low. If typical flights were as short as typical rail journeys, air travel would show as more dangerous because more time would be spent in take-off and landing. In fact the chance of death
per journey is about
six times worse for air than for rail, even by global statistics.
Air travel is hard to compare with rail but people still do. For example some of the other guys at work travelling from London to the north of England try to tell me it is safer flying than by rail - yet it certainly is not for such a short flight, and in the UK. Also, here is a quote from that idiot Elon Musk's infamous (and influential) "White Paper" advocating Hyperloop :
The train … would be less safe by two orders of magnitude than flying
How the heck he gets that figure, goodness knows; he loathes railways of course.
Here is an interesting table. The aircraft shows as safest in per km because of the long journey factor, but the Space Shuttle is a more extreme example of this effect - the Space Shuttle gobbled up such vast distances between its extremely unsafe take-offs and landings that
per km it is not much worse than a car, even though you had a 1-in-60 chance of dying when you boarded one.
There are also now over 3 times as many cars on the road than 1966. Most of the fall in deaths has come about through safety improvements in road vehicles, legally enforced maintenance of safety critical aspects and better braking/lighting/roadholding visibility leading to less incidents involving pedestrians as well.
Not just that, a lot of the fall in deaths is because there are far fewer pedestrians and cyclists now. For example in 1966 kids walked or cycled to school, but now they are driven there - which also explains some of the increase in cars. There is also the drink-drive factor. As a child I remember men
boasting how drunk they had been when driving, like how they found their way home from the pub with their front wheel scraping along the kerb.