Depends on the circumstances.
If I want to get to Leeds on a weekend it's a 44 minute round trip on the train and a £6.20 return ticket.
In the car it's a two to three hour round trip and £15+ in petrol and parking charges.
If I worked in Leeds a season ticket would be £1,104 and, again, a 44 minute round commute each day. That's £4.80 return each day assuming a 46 weeks working five days per week, and I'd have any travel I want on a weekend too at no further cost.
In the car it would be a good two to four hours round trip per day (depending on traffic), at least £2,400 a year in petrol and I dread to think how much in parking.
When I walked up Pen-y-Ghent last year I took the train to Horton-in-Ribblesdale. The cost of the ticket was about the same as the petrol and parking would have been in the car and the journey time about the same, so I took the train.
On the other hand...
If I fancy a break in Cornwall the rail fare is eyewateringly expensive compared with the petrol cost of going by car and the journey time is about comparable. Also, the cost by rail is multiplied by the number of passengers whereas the increase in fuel consumption in the car caused by adding the weight of more passengers is negligible. I'd still prefer to go by train though as a particularly love the portion of the journey from Exeter to Penzance. I might not have the choice though!
I know that railway bashing is pretty much a national sport in the UK but, ultimately, it's horses for courses and making a choice on its own merits.