When I was a first-year, I was impressed when a senior student told me about her various hobbies--she sang in a choir and also rowed crew.
"You have time for hobbies?" I had asked her.
"You make time for hobbies," she told me. "This isn't undergrad anymore. This is the rest of your life."
While there are some PhD students (often experimental scientists working under intense supervisors) who do not get many hours to themselves, many of us are fortunate enough to have some say in how we spend our time. And depending on how well we manage that time, PhD students can have quite fulfilling lives outside of our work.
My friends and I have had significant hobbies outside of our PhDs. I spent some years starting and running Graduate Women at MIT (GWAMIT); I have been known to get into crafts like linocut block-printing and cross-stitching for weeks at a time. My former roommate took up serious running and bread-baking during his PhD; as a postdoctoral researcher he started teaching himself to make his own shirts. I've known many top-notch researchers who are in bands. I once heard about an MIT professor who spends four days a week on his science and one day a week on improvisational acting. He found this balance to enrich his life--and improve his science.
In general, understanding what depletes you and what replenishes you makes you more effective at life. I've learned, for instance, that if I clear my mind after a short period of working hard on something I can be more effective when I continue to work on it. I've found "mindless" physical activity (yoga; running; cycling) to be good for this, while physical activity that requires more thinking (rock climbing; acrobatics) is too exhausting. I've also learned that having intellectual stimulation outside of my research is important for resetting. For this reason I do a lot of extracurricular reading and writing.
Given the uncertain nature of research, hobbies are especially important for PhD students. Research—especially in its early stages, especially if you're working on a single project—can be emotionally difficult: there are many unknowns and the pace can be quite slow. This kind of work often doesn't yield the "flow state" or the consistent validation that keeps people happy. Without having some other source of fulfillment, it can be easy for students to become anxious or depressed. Hobbies can do a lot to improve morale, especially if they involve getting better at a skill with some certainty. This argues for having a small number of focused, serious hobbies rather than many shallow hobbies. For me, and for several of my friends, starting Graduate Women at MIT provided the consistent validation that we may not have been getting from our early-stage research.
Finally, hobbies are a great way to work on important skills your specific research project may not give you. Early in my PhD, I worked mostly with my advisor and was shielded from the more bureaucratic parts of academia, such a grant-writing. Through Graduate Women at MIT, I learned how to work with my peers, how to navigate bureaucracy, how to reach out to/negotiate with speakers, how to get people excited enough to join me in doing work, and how to organize people in executing on plans. This prepared me for pursuing collaborations later in my PhD and has also made me feel more prepared for the next stages of academia. My writing hobby, and the speaking opportunities that have come out of it, have helped me develop my communication skills. This has been helpful especially because the opportunities to write and speak that have arisen during my PhD have tended to be much more infrequent and fairly high-pressure (papers; conference talks; invited talks).
If you're one of the PhD students lucky enough to get a say in how you spend your time, you can have quite a few hobbies if you manage your life well. Remember that not all hobbies are created equal. Knowing what works for you can make a huge difference!