Its mostly just personal preference. The real key is to try and put as few bends as possible, and make the bend radius as wide as you can. With a truck you usually have plenty of space to work with.
Its a little louder in the cab if it exits in front of the tires and you will get more exhaust residue on the side of the truck. I think its legal in most states, but its not done very often.
A straight rear exit is harder to route around the spare tire if its still in the back under the truck. A side exit may be more convenient if you use it as a work truck, since it routes the exhaust away from the tailgate where you are trying to hook up a trailer or load something into the bed.