Bayern through with victory over Villarreal
Frenchman Ribery gave the German hosts a third-minute lead after a defensive blunder and Mario Gomez added his 14th goal in his last 11 Champions League games, tapping in from close range to go top of the scorers' list with six this season.
Jonathan de Guzman scored only the second goal of the competition for Villarreal when he cut the deficit in the 50th minute but Ribery made sure of victory with a solo effort 19 minutes later.
"It was very important to secure top spot in the group early," coach Jupp Heynckes told reporters. "I did not like the goal we conceded and that meant we had to up the pressure again."
Bayern, who have now won 10 of their last 11 home games in the competition, are on 13 points, five ahead of Napoli who defeated Manchester City 2-1 to move up to second place.
Villarreal have yet to win a point in the competition this season and have managed a meagre 16 shots on target in five matches.
"We are proud and happy to have reached our goal with a game to spare," Gomez told reporters. "As for Franck, he was outstanding today."
On a foggy and freezing Munich evening, Bayern, who needed only a point to go through, got off to a dream start.
Carlos Marchena's disastrous pass forward only found Bayern's Toni Kroos who picked out Frenchman Ribery in the box for a simple chip over keeper Diego Lopez in the third minute.
Kroos was imperious in midfield, changing pace and direction, as the Bundesliga leaders Bayern laughed off Saturday's defeat to champions Borussia Dortmund as well as the absence of the injured Bastian Schweinsteiger.
Villarreal, missing Giuseppe Rossi, Nilmar and Cani to injuries, looked dazed and continued to lose possession deep in their own half, allowing Bayern to tear apart their fragile defence at almost every attempt.
Dutchman Arjen Robben, in his second game back after undergoing groin surgery in October, could have added another goal four minutes later but failed to connect properly from close range.
It was only a matter of time, however, before Bayern scored again. Ukraine international Anatoliy Tymoshchuk rattled the post with a 22-metre missile and the ball fell into the path of Gomez, who tapped in.
The Spaniards pulled one back with a fine De Guzman volley from a Joan Oriol far-post cross five minutes after the restart but Ribery killed off any hopes of a comeback when he rounded Lopez for his second goal of the evening in the 69th minute after again being set up by Kroos.
"It was a respectable game and my team should emerge stronger," said Villarreal coach Juan Carlos Garrido. "It was a game where things were done well but the result did not reflect it."