Mr Ban conveyed condolences to the families of the victims and backed the government’s vow to bring the perpetrators to justice.
The victims died in bomb blasts and an attack on churches in central Nigeria.
The area is a flashpoint between the mainly Muslim north and largely Christian south.
Mr Ban said he was appalled by the acts of violence, especially as they happened at “a time when millions of Nigerians are celebrating religious holidays”.
He said he “supported efforts by the Nigerian authorities to bring those responsible to justice”.
Nigerian President Goodluck Jonathan said: “I assure Nigerians that government will go to the root of this. We must unearth what caused it and those behind it must be brought to book.”
Nigerian State Information Commissioner Gregory Yenlong said that “enemies of the state were at work” in the violence.
He appealed for people to remain calm, adding: “We expect drastic measures to be put in place – you can see how charged the atmosphere is.”
African Union Commission chairman, Jean Ping, also expressed shock and sadness at the violence.
The main attacks were near the city of Jos and in the town of Maiduguri.
The unrest was triggered by explosions on Christmas Eve in villages near Jos.
The bomb attacks killed 32 people and left about 70 injured.
Reports said two bombs exploded near a large market. A third hit a mainly Christian area while the fourth was near a road leading to a mosque. No group has said it carried out the attacks.
About 30 attackers raided a church in Maiduguri, killing the pastor and others, and setting the building on fire.
Another church in the town was also attacked and a security guard killed, reports said.
Further violence between armed groups broke out in Jos on Sunday.
Witnesses said buildings were set alight and people were seen running for cover as police and soldiers arrived.
Jos has been blighted by religious violence over the past decade with deadly riots in 2001 and 2008.
The tensions stem from decades of resentment between indigenous groups and settlers from the north.
Correspondents say that although clashes are often blamed on sectarianism, poverty and access to land and other resources are often the root causes.