I start with a rough idea of where and how long the trip will be. I used to have several ideas in mind a good flight deal would decide where I was going. Now I have an idea and shop for the best flight.
The first thing I do is study options, places to go and things to see. I try to build as exhaustive of list as possible getting information from guidebooks, forums, trip reports, TV shows, newspaper/magazine travel articles, etc. Then I rate them as must sees, good to see if I have time, or not interested. You should ask the people you travel with to peruse the list and, at least, point out the ones they would really like to see.
After that I start building an itinerary. For me two must sees equals one day, one in the morning and one in the afternoon with lunch between. I don't schedule any "good to see" sights but build a list with information to keep handy for when time and energy permit. If you can't live with missing a "good to see" sight, it probably should be listed as a "must see".
One full day of activities means I need to stay the night before and the night after (two nights gives you one full day). In places with only one must see, I try to schedule that as a stop enroute on my travel days ( moving between two overnight stays in different places). I know how many days I have so I let the things I really want to see dictate how far I can go rather than defining where I want to go and squeezing in as many must sees as possible. Some places I'll want to see a lot more than the average traveler. Other places it's just the opposite. I can't give you a rule of thumb how long to visit a town or city because only you really know your own preferences.
At the same time I start building, and refining, a pack list. How warm or cold is it going to be? Do I need clothing for any special activity (swimming, hiking, skiing, etc.). Do I really need this? How much will I use that? I start knowing the maximum I will pack, in terms of size and weight, then keep refining it until I have clothes, all mix and match that serve multiple purposes, for every need inside of the limit. Traveling light is so much better IMO, so I seem to be a little lighter each time and can't imagine how I ever needed to check a bag (or even carry a full size carry on).
Ultimately, you learn a little more each time you travel. Right after the trip, while it's fresh in your mind, save some notes about what you could have done without, what you wished you had, anything you would do differently.