Ben Underwood, who used echolocation to get around, passed away Jan. 19 at his Elk Grove home.
His story drew national media attention, including an appearance on "The Oprah Winfrey Show."
Wonder said he and Underwood became friends after meeting at a vision technology event.
"We immediately connected. And I knew then that I was blessed to have the pleasure of meeting prince of love [Underwood], a man that through all of the challenges that he was confronted with, was able to encourage even myself," Wonder said.
The crowd at Harvest Church of Elk Grove was brought into a call-and-response during Wonder's performance.
Underwood was laid to rest Monday, which would have been his 17th birthday.
Wonder also played a joyous "Happy Birthday" song on the piano for his friend.
Friends said Underwood was an inspirational and fun-loving person who liked to play Nintendo, ride bikes, and surf.
"Ben had the vision. He had the vision of the hope of true life and life more abundantly," Gordon said.
Underwood's mother, Aquanetta Gordon, said the cancer that took her son's eyes returned and spread to his brain and spinal cord.
Gordon said her son had a strong faith and wasn't afraid of dying.
Hundreds of messages have been left for Underwood's family on his Web site.