Go to http://alexmoon.github.io/ksp/ and plug in the destination and current time, this will tell you when you're leaving and when you're arriving. Now swap the origin and destination, and plug in the arrival time as the earliest departure time. Subtract your launch time (which you'll want to assume is a few days before actual departure) from the arrival at Kerbin time. Add life support containers until the TLS window shows that you have support for at least that long. To be extra cautious, you could launch an unmanned supply vessel with life support containers and fuel. If you messed something up, you can then rendezvous with that supply vessel, dock, and transfer over what you need. With Duna or Eve the window frequency is short compared to the travel time, so the supply vessel needs to be launched at the same time or earlier. With further destinations though, windows are more frequent relative to travel time, and you could feasibly send your supply vessel after launching your manned vessel and have it arrive in time to be useful.