I've just concluded a session of late night programming. I've gotta say, its one of the best coding experiences I regularly participate in. Its just so awesome to sit down and tackle a problem that can be completed in one night. I'm not always sure it results in the best code (and I try to never submit code that I've done at night until I can get a code review), but the feeling of accomplishment is awesome. Also the amount of work you can do in one go is just incredible. Day to day, I think its difficult to see how much the rest of your job interferes with you actually coding. Rather it be talking with teammates (something I think is strictly a good thing), going to meetings (bad), going to lunch (good), or just being distracted by incoming email (bad and good), my day life is pretty interrupt driven. When you have all these distractions, it can be difficult to really hunker down and get in the zone.
So, sometimes (especially when I'm excited about some project), I just come in on the weekend or late at night. Everything is quiet. There are no emails, no teammates, and no Air Conditioning (they turn it off). Just you and the code (and music, if you're me). For me, it all comes together when you get done and you send your victory email. For me this normally takes the form of a code review request. Once I've decided I'm ready, I switch over to the email client for the first time in many hours, and I get to enumerate what I've been able to accomplish to someone. Its great.
Recently, I've been starting to obsess about these interrupt issues during the day. I've unsubscribed from several high-traffic email lists, and I try to force myself to not even look at the email client more than once every 10-20 minutes. But given what I feel like now, even that is not enough, so sometimes I work at night :).
Working at night can also lead to some bad things. For instance, you don't have the resources you do during the day. You can't ask your CSS master officemate questions, you have to look up answers. While this can make you better (much better) at solving your own problems or working around them (you quickly start ignoring things that touch other teams, for instance), it can waste an enormous amount of time. You sorta have to know when you've ratholled too long, and start thinking about ways of skipping that part of the problem until you can discuss it with others.
I'm not going to stop this behavior anytime soon, though... Its quite a rush.