When looking at existing stations, or new stations on previously used land (brown field sites), you need to take into account also, where the original natural ground level was, as the current ground level may now be at a different height.
And when considering a underpass, where the maximum normal ground water level actually is. Because this can be substantially different to the ground level.
You wouldn't tunnel, you'd dig a trench and put a roof on it.
Fine - ground work then. it is still going to be an expensive task
Especially if the trench hoes below ground level, as you then need lots of extra work on drainage and that sort of thing.
If an underpass is being considered, the local ground conditions will determine the method of construction. So it could be an actual tunnel or a cut and cover trench.
The ground conditions also determine the cost of both an underpass and the cost of a bridge, because the ground conditions affect the bridge foundations. Hence it is possible (although probably not very common) that a bridge could be more expensive than an underpass.
Drainage would not be expensive if the ground water level is lower than the lowest level of the underpass.
A lot of the major stations built by the original GWR (or affiliated companies) have subways - Bristol Temple Meads, Bath Spa, Cardiff Central, Taunton, Swindon, Didcot Parkway, Plymouth. I note it's been stated upthread Reading originally had a subway too. On the other hand, Exeter St Davids, Newton Abbot, Newport, Cheltenham Spa and Oxford to name a few have footbridges (and presumably always have), so it doesn't seem as though there was a deliberate policy.
Much more likely to be affected by the lay of the land as others have suggested.
Bristol Temple Meads actually has three underpasses not including the original Brunel station. The extension to the Brunel station (currently a covered car park) has one (closed to the public, but I’ve been in it), the main underpass for platforms 3 to 15, and a parcels underpass that runs parallel to the public underpass (closed to the public, and yes, I’ve been in this one too). Both the public and the parcels underpasses have lifts provided (although the lift on platform 13/15 was not replaced for the parcels subway).
When there was an island platform between what is now platforms 3/4 and 5/6, this was served via a footbridge.
The whole of Bristol Temple Meads station (all parts of it) is built on arches (yep, been in these also). It is significantly higher than the natural ground level that originally existed. Part of the reason for it being built at a higher level, is because it was a flood plane for the river, and was rather marshy land.
Hence it made sense for underpasses to be provided.
The railway line for Bath Spa is of course elevated on embankments, bridges and viaducts, so of course it made sense to have an underpass for the station. Again, it passes next to and over a river.