When I worked in Potsdam and lived in Berlin, I used to commute by double-decker "Sputnik" train on the line Berlin-Karlshorst - Genshagener Heide - Potsdam. The Berlin repeaters on 70 cm and 2 m were easily accessible from this stretch of tracks which mostly passes through open countryside. I had a few contacts via DB0TA and other relays and even some nice simplex QSOs. Of course, I always chose a seat on the upper deck. Probably thanks to the inclined windows I could sometimes even hear the downlink of the AO-27 satellite with good signal strength (but I didn't attempt a QSO - shame on me).
Once every three or four weeks, travelling on the Interregio train Chemnitz - Berlin which until 1997 had one or two older cars, I talked to a group of hams in the Elsterwerda area on 145.525 MHz from about 15 to 20 km away, using 2.5 W on FM and a more or less vertical dipole suspended from the luggage rack. When the "Schönes-Wochenende-Ticket" was still cheap enough that price vs. distance considerations didn't really matter, some excursions from Berlin towards the Baltic Sea, or from the Harz to the Ruhr area using the same equipment "netted" several new station in the log and boosted my collection of DOK.
During a stay in the UK between 1998 and 2000, I just managed to contact two talk-in stations at radio shows (Hey, chaps, where's that QSL?) from a train despite carrying my old TH-75 almost everywhere (sometimes even listening and calling from the London Underground).
I have not managed a QSO from train to train yet, although I met a few road-mobile stations while travelling by train, and once, between Halberstadt and Blankenburg (Harz), I had a QSO with an aeronautical mobile station. Train-to-plane, anyone else? Also, I haven't tried other modes than FM, and other bands than 2 m and 70 cm.
Unfortunately, nowadays almost all railway passenger cars in Germany and in the UK have tinted windows, and most windows of them don't even open any more. Only very few truly "radio-friendly" passenger cars remain, if any at all. If you want to try a QSO from a train, look for a seat in one of the oldest cars (in Germany usually silvery, green-beige or blue-beige) - your safest bet will be a museum train or a narrow-gauge line operated with heritage equipment.
In short, QSOs from new and re-built cars are only easy with stations near the railway line. Attaching the antenna to the (non-tinted) windows of the communication door at the rear end of the train (if not push-pull operated) may sometimes work better, but the "angle of view" is restricted. The electronic equipment aboard many new railway cars can generate some strong noise, in particular on 70 cm, making QSOs even more difficult.
I hold that horizontal polarization is better for mobile communication (even though vertical is generally preferred) - apart from the fact that signals are less affected by trees and buildings that way, the dipole would fit nicely into the train window ;-)
Train-to-train communication on underground rail systems could be most interesting in terms of propagation studies. RSGB have published an article on "cave radio" in the May 2008 issue of RadCom in which experiments in railway tunnels are described.
I summarize here some information which I obtained in e-mails from Tony Langdon, VK3JED:
There are a few amateurs in the Melbourne area who who regularly "play" radio on the train, often on 70 cm via repeater.
Melbourne underground railway tunnels are fairly deep (about 20 to 30 meters). The VK3RCC repeater, which is on top of a tall building in the centre of the city, can't penetrate the tunnel at all, except for a little bit at the ends.
Tony did train to train QSOs a few times, as well as train to tram, bus, or other vehicles. He used both FM and SSB on 2 metres. SSB gives a little extra range, but the noise can be more irritating. He also managed to work the SunSat FM amateur satellite from both a train and a tram. On SSB 25 to 30 km have been covered, the mobile station using a FT-290R with a quarter-wave antenna.
He recommends: "The best you can do is (1) use the best antenna possible, and (2) lower the frequency, 2 metres is the best band on these sorts of trains, leaves 70 for dead (when there's no tinting, the two bands are similar in performance, unless the windows are very small, in which case, 70 is the better band)."
There are rumours of a HF operation on the trans Australian railway route (Adelaide to Perth), which involved a setup which was equivalent to a top mobile station on 40m including external antenna. Perhaps the driver was a radio amateur. Nothing has been found on the WWW concerning this operation except perhaps a notice on http://www.fam.aust.com/ashton/rail.south.australia/pasgr.htm that an intended operation in 1979 had to be cancelled at short notice.