The answer depends on your spending habits and priorities and many other factors. However, just on the basis of the numbers you give, the simple answer would be no. The difference in cost of living between Madison and San Francisco is almost certainly more than the roughly 25% increase in your salary. This is assuming you actually mean San Francisco and not just the bay area in general.
Housing prices will be the biggest shock. San Francisco has arguably the highest housing costs of any major US city at the moment. If you're actually going to live in San Francisco proper (as opposed to elsewhere in the bay area), your rent for a comparable apartment would almost certainly double, and could easily triple.
Here are some comparisons from websites that compare cost of living in various places:
- Expatistan says SF is 72% more expensive than Madison.
- Nerdwallet says SF is 57% more expensive.
- Bestplace says SF is 55% more expensive.
- Bankrate says SF is 55% more expensive.
- Numbeo says SF is 46% more expensive.
This doesn't of course mean that the move would be a bad idea. There are many other things to factor in, of which perhaps the most important are "How much do you like living in Madison?" and "How much do you think you would like living in San Francisco?" There could be things about San Francisco that you would like enough to spend more for them. In the end, it's a personal choice that's about much more than money. Even on a monetary level, you should factor in things like how likely future salary increases/career advancement would be in SF vs. Madison. But on the raw numbers, I think it's clear that $125K in San Francisco will not buy you as much as $102K will buy you in Madison.
Of course, if you're not going to live in San Francisco, but somewhere else the Bay Area, the answer could be quite different. The bay area as a whole is pretty expensive, but San Francisco in particular is insanely expensive. The sites I linked to should give you a good start on assessing cost of living comparisons. My hunch is that most places in the bay area with standard of living comparable to Madison will still be more than 25% more expensive than Madison, but you might get lucky.