Shorts should hit just above the start of your thigh.
This is generally speaking and in most cases. Short enough to appear preppy at first glance without provoking controversy. Why not just "at the knee"? Because that is where it should fall for the common man (and still this is a roadblock for most guys), but the preppiness inside all of us wants to be a bare legged tease. Try on some soccer shorts and you'll get the picture. Much like the distant cousin, No Break, we want to show off some skin to give off the preppy vibe without being distasteful or being laughed at. A few inches above the knee is the goal where your quadriceps, or *cough* Vastus Medialis Obliquus begins. The fratstars and southern prep guys tend to go shorter, sometimes as far as mid-thigh. I'll leave that to personal taste but just make sure your boxers don't creep out when you sit down in the classroom.
Why are short shorts distinctively preppy? Besides the obvious lineage to how athletes wore their shorts in traditional prep school sports (again, tennis great McEnroe as example), one major reason is that present common day fashion dictates that longer is better and trad is usually the opposite of that and immune to any hiccup style trends. Seeing someone wearing chino shorts in an anti-sloppy manner shows his allegiance. Take a look at some of the major preppy brands. Patagonia Stand Up shorts in 5" and 7" inseams. Ralph Lauren Andrew shorts in 6". Vineyard Vines Chappy swim shorts at 8". Could you see a regular guy in these? Nope; reserved only to those with enough balls to wear them out (notice I did not say hang out).
Aesthetically, short shorts balance you out. It makes you look taller and streamlined and less like an eight year old son swallowed up in his father's clothes. Especially since we tend to tuck things in, 7" shorts look better than a 11" paired with an OCBD or polo. Plus there is some unwritten trad rule that the heavier or longer the top of your outfit is, the shorter your shorts can go, like this member from the AAAC illustrates with his Stand Ups. It's an outdoorsey minded style that makes regular folk go "huh?" much like beaten-in penny loafers or a vintage gray Champion sweatshirt over a tattersall.
As I alluded to, there is a fine art in the perfect spot where your shorts should hit, and it depends largely on height. I stand at 6'1" and have found that 7" to 8" inseam shorts fit perfectly. Unfortunately there are not many makers that offer this off-the-rack and so I resort to tailoring my shorts as needed. Guys taller than me can get away with the standard nine and guys shorter can look great in the five or six. Let your eyes be your judgment.
It also depends on the material of your shorts. Chinos and athletic shorts (lacrosse, soccer, rugby) tend to be at the 7" to 8" range for my liking. Certain summer material may have an excuse to go to the usual 9" right above or at the knee, such as seersucker and gingham. Merely my own preference though, but unless you are a giant, keep 9 inches at the extreme and never foray into the 10+ range.
Lastly, if you have toothpicks for legs then get them in shape before you show off your quads and calves! Squats and deadlifts is all you need for the girls to notice :)
Going to the gym with my old high school lacrosse shorts. Taking the high rise into account, these shorts have a 7" inseam.

My trusty reds, tailored to the perfect 8" inseam. The majority of my shorts are 7 to 8 inches. You want your quads to peak out. (This outfit makes a great patriotic palette btw).

The longest I'd go in length, these Nautica shorts have a 9" inseam and hit just above my knee. I reserve this length for summer fabrics such as seersucker or critter patterns, and let the motif do the talking.
