It is best to either do cardio first thing in the morning on an empty stomach or late-night well after your last meal. When you do cardio first thing in the morning, you are burning stored nutrients since you don't have any food in your stomach or in you digestive system. When you do cardio last thing at night after your last meal has had some time to digest, you are burning off any unused nutrients from the day so that they are not stored in fat cells when you go to sleep. For higher-carb days, be sure to do your cardio at night, but if you plan on not taking in a lot of carbs for the day, go in the morning.
As to the length, I usually do 30min each session. I just go in and get on the stationary bike and zone out. If you are running outside, it is usually easier to go longer. I would say that you wouldn't need to go for more than an hour at a time, at the very most. Just remember...there is such a thing as too much cardio. You will start eating away at your lean muscle mass. I would say to start out with 3 cardio session per week and see how that goes for you. If you aren't seeing results, bumb up the time you spend on each session and/or add another cardio session to your week.