My wife's old passport has her old surname and a valid Schengen visa on it. She got her passport renewed with a change in her surname. Will the visa still be valid?
The situation is very common (imagine, many people do marry :-) and the administrators in the Visa issuing agency will know what to do. So just go there and ask. (I would be helpful to know which Schengen country you live in).
When a passport expires or is invalidated the Visa in it MAY become invalid. Now we have to differentiate:
Old passport not invalidated (some countries allow two passports): No problem. Just carry the old passport.
Old passport invalidated. Schengen countries will generally accept the Visa if both the new passport and the old one are presented.
If you want to be on the safe side the recommended action is: Go to the issuing agency and transfer the VISA to the new passport. This is a formality as the administrators are well acquainted wiht the situation. Don't delay this too much.
PS: Do not try to travel (in particular not outside Schengen) with this constellation. Some leniency will be expended to your wife by the issuing country, but other countries are likely to reject the Visa.