Ronaldo opened the scoring in the 24th minute by curling home a free kick.
The Portugal winger then notched his 100th goal for the Spanish club by converting a penalty in the 69th after Lyon fullback Mouhamadou Dabo had fouled him.
Madrid tops Group D with 12 points, five clear of Ajax, which routed Dinamo Zagreb 4-0. Lyon remains third with four points.
“We knew a win here would secure qualification,” Ronaldo said. “We played well but it was a difficult game against a tough team. We are happy that we’re through.”
Madrid is the only team in the group stage that has won all its matches and has yet to concede a goal. It outplayed Lyon by stifling the hosts in midfield with its pressing.
Madrid striker Karim Benzema collected a through ball from Mesut Oezil to be clean through but was denied by goalkeeper Hugo Lloris in the 10th.
The Spanish side threatened again in the 23rd. Oezil found Benzema with a backheel flick but Lyon midfielder Yoann Gourcuff stopped the play by shoving Benzema on the edge of the box.
Ronaldo exploited a crack in the Lyon wall from the ensuing free kick to place the ball out of the goalkeeper’s reach.
Madrid came close to adding a second goal before halftime. Lassana Diarra played Oezil in but Lloris came off his line to knock the ball away in the 29th.
The France goalkeeper saved his team again in the 32nd by parrying a shot from Benzema from Ronaldo’s pass.
Madrid winger Angel Di Maria led a counterattack in the 44th and fed Oezil but the Germany playmaker’s tame effort was no trouble for Lloris.
Lyon nearly equalized twice against the run of play. Winger Jimmy Briand chested down a high cross from Dabo to shoot straight at goalkeeper Iker Casillas in the 35th.
On the stroke of halftime, Lyon striker Bafetimbi Gomis won the ball in midfield to release Gourcuff down the right wing, but Casillas tipped Gourcuff’s powerful strike over the bar.
Ronaldo threatened a couple of times in the second half before firing the spot kick into the middle of the net to make it 2-0.
“We faced a team that was stronger than us,” Lloris said. “I think it’s probably the best team in Europe right now.”
Lloris prevented Madrid from adding a third goal by stopping a low curling shot from Di Maria in the 73rd.
Lyon almost scored a consolation goal in the 78th but Briand’s header from a corner by Gourcuff crashed against the bar. The Lyon winger beat the offside trap to have another chance in the 89th but his chip sailed wide.