Working from home may sound practical, convenient, and awesome, but it has many drawbacks. An office environment is better because it makes it easier to delineate between work and leisure. The mind can shift into work mode in an office environment without worrying about home distractions, such as solicitors and uninvited visitors. Additionally, an office typically absorbs many expenses, such as heating and cooling, coffee, phone service, and electricity, that can outweigh the cost of an office worker's commute.
I think that it is better to work from an office, since it will be more of a work place atmosphere, and you will feel like you are in a place meant to do work. If you are at home you will be wanting to be lazy and get distracted.
I personally think that it is better to work from home because it is in the comfort of your home as well as it is no distractions. I personally think that it is better to work from home because it is more responsible as well as getting to understand the material better.
I have done the office life. It was fun at times, but there was always an under current of some sort of inner office drama which was at times annoying. I do miss some of the friendships, but those only last when you are at the job. After working from home it is a lot nicer to work my own schedule and have time to do the things that I need to get done.
It is better to work from home than it is to work in an office, because a person who works from home can work in their pajamas. They do not have to waste time gossiping or in office politics. Working at home a person has more flexibility to take time for their children.