Both are important.
No matter how perfect the backend is, a crappy frontend will turn users away. I can't think of a good example of this right now - but they are out there.
On the same token, a nice frontend with a bad backend won't fly. An example of this would be the Flashback product produced by Site5. It was a version-revision system for web hosting. Anyhow, their frontend was slick - it had the potential to be very useful. However, their backend was slow and made it impossible for them to push Flashback out to all of their servers. (They've revised the system, read more
here and
here.)