There are a lot of free tennis courts to play tennis in San Francisco
Here is a Google Map of every public tennis court. It’s group by single courts and multiple courts sharing the same space.
Bookable free courts in San Francisco using Spotery.com – these courts are part of the free tennis courts and allow you to book 7 day ahead at 8am or 2 days ahead at 12pm. See this site for details https://www.spotery.com/site/sfrp
See this great resource at tenniscoalitionsf.org
Tennis Coalition also offers resources to find other people to play with.