LAX seems to be easiest.
With family only 30 miles from Whitney Portal this isn't normally an issue for me, but this year they're out of town so I had to handle logistics myself. I'm hiking the JMT starting Saturday. I'm going public transit all the way from home and back. Here's my plan, changed to show transport from LAX instead of my house in Long Beach.
I think that LAX makes sense because it can be hard to get back to San Francisco from Lone Pine. "Open Jaw" type tickets where you arrive at one airport and depart another tend to be rather expensive.
From LAX take the "Union Station Flyaway" from just outside baggage claim to the LA Union Station railway depot. From there take the Amtrak (US national passenger rail) "San Joaquin" route to Yosemite.
You don't actually ride rail the whole way- Amtrak bus from LA to Bakersfield, then rail, then Amtrak bus from Merced to Yosemite Valley.
To see the schedules for Flyaway:
http://www.lawa.org/lax/LAXflyAway.cfm Cost is $4
http://www.amtrak.com Specify departing station LAX and destination YOS. I'm leaving LA at 10:45 AM and arriving 8:05 PM Saturday next. Cost was $50.
Getting back is more tricky- currently it takes three buses, a train, and another bus to get from Lone Pine to LAX. I'm hoping to just hitch a ride from a fellow hiker when I arrive at Whitney Portal, but use the bus as a fallback option. The bus schedules are designed to coordinate with only about 1/2 hour wait each time. CREST from Lone Pine to Ridgecrest, then two Kern County buses- Ridgecrest to Mojave and Mojave to the Lancaster Metro Rail station. Then Rail to Los Angeles Union Station, finally back on the Flyaway to LAX. This itenerary is only valid Monday, Wednesday, and Friday.