3 months seems like it would be on the tight side, especially if you're not an endurance athlete capable of sustaining a particularly fast pace every single day. The Pacific Crest Trail Association recommends allowing at least five months for the entire trail, and you're doing a substantial portion of it. The time will depend a lot on weather and other factors outside of your control.
If we assume you start around Tuolumne Meadows in Yosemite, to pick a convenient and beautiful location vaguely east of San Francisco, we can use these mileages to find an approximate distance of 1,764 miles. Doing that in three months requires an average of ~20 miles/day, or closer to 24 miles/day if you take one zero day a week. This appears to be somewhat faster than the average PCT hiker. A few delays could easily sink your chances of finishing. Starting farther north is always an option too.
This is obviously a very serious hike that requires a lot of preparation. The PCTA has extensive information on the trail, including maps and guidebooks. This is really the kind of question you can only answer for yourself by learning everything possible about the trip and assessing your own experience and abilities. It's also the kind of question where if you have to ask (beyond just looking for someone to validate your considered thinking), you haven't done enough research yet. The Association also operates a Facebook group where you can discuss the details with experienced trail-hikers.
I would give some more consideration to applying for the visa. There is a risk involved (if you are denied for some reason, you won't be able to use the VWP in the future and will need to apply for a visa again), but the advantage of not having legal pressure hanging over the timeframe for your hike is huge. Three months is even less time when you figure that you need a few days on the start and end and that, if you find yourself in time pressure, extricating yourself from the trail and getting out of the country will surely take at least a few days.