There is no right or wrong answer to whether it is ok or not to work from home. It really depends on your job nature and the personality you have. Some job requiring frequent face-to-face interaction with colleagues and clients and those kind of jobs would be better off done at the office. Other jobs where the real work is done mostly individually or alone can be done at home. At the end of the day, like any job, it's the results that matter. If you can produce results which is the same (or better) regardless of whether you work from home or at the office, then I see no reason why you can't work from home.