There are a number of tools you can use to calculate a launch window. This page covers two - the default Transfer MFD that comes with Orbiter, and my own TransferX MFD.
The example I'll use is a hypothetical journey from Earth to Mars. Set the Transfer MFD up as follows.
The solid blue line shows where your craft will intersect Mars orbit, and the dotted yellow line shows where Mars will be at the time - quite a few million miles away.
Now use the EJ+ and EJ- keys to swing the whole thing around until the Mars intersect line is on top of the dotted yellow Mars line, as follows.
This now shows the following. If you eject from Earth orbit when Earth is where the dotted green eject line is, then you should arrive at Mars orbit at the same time as Mars does. In short, you have found a launch window.
Now all you need to do is calculate how long it will take Earth to travel from its present position at TrL=146.98 to the required ejection longitude at TLe = 170'. For Earth this is easy(ish) as Earth moves roughly 1 degree longitude per day - as we all know, there are 360 degrees in a circle, and 365 days in a year. Add this number to your present MJD to give the MJD of the eject time.
You can edit a scenario file to this MJD if you don't want to wait.
With other planets it's a bit more complicated. A good approximate method is as follows.
If you don't want to do all this calculation, you can use the TransferX MFD instead....
Sometimes you don't find a launch window from one planet to another using the Transfer MFD. If you don't find one, edit the scenario file to move the MJD a whole orbit into the future or past, and try again. In most cases you should find a window on the second attempt.
TransferX is an add-on of mine. The method of using it to find a transfer orbit is similar, and avoids the calculations and complications needed with the Transfer MFD.
At this point you have three yellow targeting lines. The one touching Earth's orbit is the eject time, whilst the other two show the distance between your craft and Mars at closest approach. As you can see, the distance is considerable!
You can now read off the Eject MJD straight from the display. Edit a scenario so that it has an MJD that's a day or two before that (to give yourself time to take off and get into position), and you're done. In this case 51973 looks good.
Unlike the Transfer MFD, you can easily look for launch windows in the past or more than one orbit into the future - just change the MJD until you find a window.
Once you're done, edit a scenario file with the MJD you want. I tend to edit it to a date a couple of days earlier than the window to give me time to take off and get organised.