You need a lot of infrastructure for trains (and a lot of it isn't even used all that much -- it's not like all rails have a train passing by every 5 minutes). You also can't get much use out of your rolling stock because the speeds are fairly slow. You also don't have the same flexibility as planes have regarding routes.
The upshot is that trains are a lot costlier than most believe think and most railway routes require state subsidies (with goods transport usually being an exception), whereas air traffic works so well it can be taxed heavily.