It really depends on how far. In halls I was 10-15 minutes walk away, in my student house I'm 20-25 minutes walk away. So 40-50 minutes of walking a day (80-100 minutes if I need to come back for something). That amount of walking can get a bit tiring. I did the same distance at college, but university just takes more out of you.
We did consider living further away, but it would've required a 10 minute train. That's £3-£6 in fares each day and several hundred quid over the year. I was adamant against it because trains can be unreliable (especially in the winter) and you could easily miss lectures or an exam if there was just no way to get to uni. The worst I have to worry about at the moment is accidentally breaking a leg and having to hop further to get in.
Regarding the social aspect (because a lot of people are worried about "not making friends"), I really don't see the issue. Most of the people I know are on my course or I met through societies. I only live with a few of them, the rest I just know from working and socialising with them. Living hours away may make it harder, but you could still sleep at theirs or whatever. It's not a case of the people within 6 feet of your bedroom are the only people you'll ever speak to.
Ultimately, look at the cost and potential convenience gained from one method over the other. I wouldn't want to have to commute as it would be tiring and really difficult to pop home for things. If you have a 9am lecture and then nothing until 3pm, would you want to stay around for hours? Most people go back to their house or halls. If you're disciplined about revision, it might not be so bad. I'd rather study in the comfort of my own accommodation than in the library though. I can also make my own food and do chores in those gaps.