I've written several mysteries for my own parties and I've helped with others, so hopefully I can help you.First you need to decide on a theme and setting, keeping in mind what resources you have to work with and what atmosphere you want to create. Is Hollywood calling, or do you have a soft spot for the Roaring 20's? Are you celebrating a bridal shower in a small cafe in Paris, or hosting a gala in Manhattan?
Next, the plot. It has to tie in with the theme and the setting .i.e. it has to tell a story. For example, a group of old friends gather at the manor house of John Doe, the deceased, a politician and friend, for the reading of his will. It goes without saying that hardly any of the guests are still the deceased's "friends", but curiosity's lured them in.
Depending on the plot, you can create a variety of characters. For the plot above, some characters could be:
Felicity Parker - the deceased's ex-wife, who's playing the part of the grieving widow perfectly. Since her separation, she's heard nothing from John...at least that's what she says. So why do phone records show a series of calls from her?
Tom Preston - Doe's oldest "friend" seems to be the only one genuinely upset by his death...but is sadness or guilt the cause?
Arthur Jones - John's loyal assistant is the one who found the body. He's also the one with the most to gain from the will, coincidentally just as he's lost his house. He couldn't know how much he's been left...could he?
Usually, stereotypical characters are some of the most fun to play. Keep your guests in mind when writing their characters. Play up their strengths (or weaknesses) e.g. if you know a particularly talented drama queen, maybe give her the role of the gold-digging girlfriend, who tries to impress everyone else with her "film" credentials.
From the basic plot and characters, you can then create clues for the party e.g. John Doe's phone records (that connect him to Felicity). These clues should (mostly!) lead to the killer. It's best to choose the killer when you've finished with characters, although to keep your guests guessing, ALL characters should have motive. Usually, motives are either love, money or revenge, but there can be others. Maybe also create a few red herrings that can keep guests guessing.
Your killer may either know beforehand that they are the killer, or they may find out during the party. To prevent confusion, it is usually best if the killer knows beforehand, so they know when to "confess". The best way I've fund of telling the killer is to put an extra slip of paper in their invitation, telling them how, why and when they committed the murder. This also gives the killer time to plan their "reveal".
For your own clarification, you may want to create a time line/ schedule of events. In order for everyone to play an active role, my mysteries often begin with the host announcing the death of the deceased. The body is never seen, as the person playing the victim would feel less involved.
Depending on the theme, you can then decide on decorations (to create an atmosphere) and food and drink to serve (finger food is nearly always the most suitable option - reasonably priced, easy to serve and minimum mess to clean up). Invitations should be prepared with the theme in mind e.g. an invitation to a coven's Halloween gathering could be made using black card in the shape of witch's hats and a silver pen, a society lunch invitation could be sent on stationary with calligraphy. You could also add costume suggestions in invitations, as well as the name of the guest's character and a short biography. Personally, I add a list of all characters and their biographies (not giving anything away!) to all guests to familiarise themselves with other characters.
Sorry for the length, but murder mysteries can be difficult to completely explain! If you have any questions, feel free to contact me. :) Good luck!