I enjoy creating a backstory for my characters...how much of it I like to share with the DM depends upon the DM though.

Some DMs ask for backstories, but require them to be so banal as to be torture to write and others take a perverse glee in using your backstory as a way to torture you.

When DMing, I like to get a backstory and character sheet before starting so I can work bits of it into the fabric of the campaign. If a character is an outcast from a noble house, I'll try to place his family someplace. If he has a god or religion he wants to follow, I'll try to find a way to fit it into the campaign pantheon or social structure. If he's a fugitive from the law, I'll try to come up with an appropriate city or town (or create one to match the circumstances the player comes up with) where he is wanted.

But sometimes things just don't fit and some campaigns just don't handle the "he's the only one of his race and/or came here on a spaceship" character well.

For both backstory and character creation, as player and DM I prefer to work it out prior to the first session to avoid wasting game time. By the time you've worked through a backstory and character creation, you have a pretty good idea of whether you'll be able to play nicely together. It also allows players to create characters with secrets the rest of the party doesn't know more easily.