It depends on what exactly you've gotta do the next day really. If you've just got a deadline the next morning, and once your stuff is in you're allowed to leave, then pulling an all nighter can be useful to give yourself some extra time.
If though it was for something like revision, for an exam the next day, then I can't imagine it's the best idea.
I'm fine with all nighters, I sleep very little anyway, so I can usually still function without those few hours I do get on a normal night. I'm awake right now, at 7am, having not slept, I am about to go to bed though, but that's kind of an all nighter! And I have been doing work, I don't have uni until tuesday though. I seem to function better at night, during the day i always find reasons to put off doing what I need to do.
My best module grade this year has actually come after I spent 16 hours solid in the library through the night doing work before hand-in.