It depends on your time and $ constraints.
Without additional info, I would suggest booking a flight from SFO to HNL and a return flight from HNL to OAK about two weeks later. Of course, I always recommend another interisland flight to Kauai while you’re there!
If this doesnt fit your budget, there are certainly cheaper routes…BART included… but “best” is a subjective term ;)