My wife is from India and I am German. We both live in Germany and she has a German residence permit through our marriage. We both plan to visit UK. Does she need a visa to visit UK?
Yes, she almost certainly needs a visa. The main exception is for people who hold a residence card as “family member of an EU citizen” (in German “Aufenthaltskarte für Familienangehörige eines Unionsbürgers”) but that wouldn't typically be the case of the spouse of a German citizen in Germany.
Other German residence permit holders fall under the regular rules based on their citizenship, which for an Indian citizen, means that a visa is required to enter the UK.
But since you would be travelling together, she would be covered by your right to free movement as an EU citizen and she could apply for an EEA family permit instead of a Standard Visitor visa. The family permit has simpler requirements and is free of charge but was unfortunately very long to obtain in the past (not sure about the current status of all this).