The 16-time Grand Slam champion, who played Monday at the French Open, said he hoped the country would benefit from the tournament.
"When I first heard that they had won the right to host the tournament, I was delighted," Federer said. "I really know the country, the people are great and the landscapes are among the most beautiful in the world."
Federer's foundation, which was launched seven years ago, supports education, sports and leisure activities in the poorest African countries.
"Hopefully (the World Cup) will be good for the future of this country after living through hard times in the past," the top-ranked Federer said.
The 28-year-old Swiss great is glad to see his country make it to the finals after a shaky qualifying campaign. Switzerland blew a two-goal lead in Israel and then was embarrassed 2-1 at home to 152nd-ranked Luxembourg, before going on an eight-match unbeaten run to win its group.
"I'm happy Switzerland went through because at one point, it was unsure it was going to qualify," Federer said.