Mr Yar'Adua leads Africa's largest oil producer and most populous nation
The panel of five judges unanimously rejected them, saying they did not contain enough evidence.
Lawyers for both losing presidential candidates, Muhammadu Buhari and Atiku Abubakar, say they will take their cases to the Supreme Court.
International observers said the April polls fell short of expected standards.
The 2007 election saw the first transfer of power from one elected leader to another in Africa's biggest oil producer and most populous country.
From a political stability perspective, this is likely to be positive
African economist Razia Khan
Send us your comments What now for Yar'Adua?
Correspondents say a Nigerian president has never lost an election challenge but the decision was not a foregone conclusion.
The country's courts have been exerting their independence recently - overturning other controversial results from the disputed elections.
The BBC's Andrew Walker in court says the ruling is a considerable blow to the opposition but it will also let the president get on with his job of running the country.
He says the ruling will fly in the face of what many Nigerians experienced during the election but most have already accepted Mr Yar'Adua's election.
Security had been tight in the capital, Abuja, in the run-up to the ruling and no big crowds were allowed to gather outside the courtroom.
"The broader issue of how you get legitimacy as a president in Nigeria rests much more with what you do in government," African analyst Anthony Goldman told the BBC.
Rigging claims
The verdict was read out point by point for over three hours by judges in powdered wigs and black gowns.
"Umaru Yar'Adua and Goodluck Jonathan remain validly elected as president and vice-president of Nigeria," the ruling said, AFP news agency reports.
Judge Abdulkadir Abubakar Jega said both sides had failed to prove that violations of the electoral law were substantial enough to invalidate the election result.
The official results show that Mr Yar'Adua gained more than 70% of the vote, compared to 18% for Mr Buhari and 7% for Mr Abubakar.
"From a political stability perspective, this is likely to be positive," African economist Razia Khan told Reuters news agency.
Neither opposition candidates claim they actually won the election - they had called for a re-run.
Mr Yar'Adua has admitted there were flaws in the vote and has promised to reform the electoral system before the next elections.
Mr Buhari, who also contested the previous election in 2003 and is a former military ruler of Nigeria, maintains the vote did not take place in 29 of the 36 states.
His lawyers had unearthed records from Nigeria's election regulator that appeared to show the results had been artificially inflated between the tallying station and being announced.
Long battle
Mr Abubakar had said the vote should be nullified because the ballot papers were delivered on the day of the election and were missing serial numbers.
Both Mr Buhari (l) and Mr Abubakar (r) want a Supreme Court ruling
The former vice-president fought a long legal battle before the election to be included on the ballot after he fell out with then-President Olusegun Obasanjo in the latter stages of his final term.
The result was the ballot papers had to be re-printed at short notice in South Africa, the court has heard.
They did not reach polling stations in many parts of the country until after the election.
The lack of serial numbers also rendered any result inadmissible, Mr Abubakar's lawyers claimed.
Before the ruling, his spokesman Garba Shehu said politicians could not be "trusted to correct themselves" and the courts had to do it.
The election was widely condemned in the press, but presidential spokesman Mobolanji Adebiyi said the judges would rule on what was in front of them, not on the media reports.
Seven state governors have had their elections overturned by tribunals.
On Saturday a court also annulled the election of Senate President David Mark.
If the presidential election is annulled, he would have taken over during the 90-day period before fresh elections are required to be held.
Umaru Yar'Adua

A judge has ruled today that Nigeria's 2007 election results, which saw Umaru Yar'Adua's become president, will not be annulled. Opposition parties claimed that the People's Democratic Party (PDP), of which the President is leader, fixed the results of the 2007 election in his favour and called for a re-run.

The tribunal ruled unanimously against the claims, with Judge Abdulkadir Abubakar Jega stating that there was no evidence that Mr. Yar'Adua had rigged the polls. Muhammadu Buhari and Atiku Abubakar, leaders of the two opposition parties who launched the case, have both said they will take their complaints to the Supreme Court.

International suspicions were also raised at the time of the election, with some voicing concern over the politcal process. 

The ruling could have negative impacts - it could be seen as an admittance of a 'false democracy' occurring in the last election and therefore undermining the political process in Nigeria. This could cause instability between political rivals and may spark protests.

Yar'Adua assumed office on 29th May 2007 after the election in April, where he won 70% of the vote. Since then, he has became the first Nigerian leader to declare his personal assets, as well as overturning hikes in petroleum and tax made by the previous government. Despite these positive steps, he has also been surrounded by controversy, with several governors who served him before 2007 being charged by the EFCC, the anti-corruption commission.

Election annulments have been passed for seven of thirty-six state governors and even the senate president, David Mark.