Is concentration an extremely important working habit?
As a mathematician, this is a very personal matter. Some people work 9-17; some have very irregular working times. Some have a habit of always going to the office to work, to help mentally separate 'work' and 'time off'; some work from home when they have no teaching or administrative tasks to do. Some people listen to music, some don't. Some check their Facebook at work, some don't. Some work in long streaks, some prefer to have a quick pause every half an hour or so.

Do whatever works for you. At this point in your career, you have been a student for at least 12 years; you should know yourself and be able to evaluate your productivity objectively.

This is even more true for a mathematician: mathematics is mostly a mental endeavour, and it is easy to start thinking about your work in your head when you are engaged in other activities, such as walking, driving or showering.
Sometimes your best ideas will come when you are not actively working/studying. Of course, you can't do everything like this, but the important ideas often strike at improbable times.

If you are a student starting out with maths, the only advice that I can give you is plan ahead, and recognize when you are going to be late if you don't increase your productivity. Many students can't tell when it's the moment to really turn off your Facebook and start studying until it's too late. Poor midterms should be taken as a big warning sign.