Volume 4, Book 53, Number 359 :
Narrated by Ibn ‘Umar (radiallaahu `anhu)
‘Uthman (radiallaahu `anhu) did not join the Badr battle because he was married to one of the daughters of Allah’s Apostle and she was ill. So, the Prophet (sallallaahu `alayhi wasallam) said to him. “You will get a reward and a share (from the war booty) similar to the reward and the share of one who has taken part in the Badr battle.”
Read this hadith in Arabic here.
This hadith is part of another longer narration which comes in Book 57 of Bukhari:
Narrated ‘Uthman (the son of Muhib):
An Egyptian who came and performed the Hajj to the Kaba saw some people sitting. He inquired, “Who are these people?” Somebody said, “They are the tribe of Quraish.” He said, “Who is the Shaikh among them?” The people replied, “He is ‘Abdullah bin ‘Umar.” He said, “O Ibn Umar! I want to ask you about something; please tell me about it. Do you know that ‘Uthman fled away on the day (of the battle) of Uhud?” Ibn ‘Umar said, “Yes.” The (Egyptian) man said, “Do you know that ‘Uthman was absent on the day (of the battle) of Badr and did not join it?” Ibn ‘Umar said, “Yes.” The man said, “Do you know that he failed to attend the Ar Ridwan pledge and did not witness it (i.e. Hudaibiya pledge of allegiance)?” Ibn ‘Umar said, “Yes.” The man said, “Allahu Akbar!” Ibn ‘Umar said, “Come, let me explain to you. As for his flight on the day of Uhud, I testify that Allah has excused him and forgiven him; and as for his absence from the battle of Badr, it was due to the fact that the daughter of Allah’s Apostle was his wife and she was sick then. Allah’s Apostle said to him, “You will receive the same reward and share (of the booty) as anyone of those who participated in the battle of Badr.’ As for his absence from the Ar-Ridwan pledge of allegiance, had there been any person in Mecca more respectable than ‘Uthman (to be sent as a representative). Allah’s Apostle would have sent him instead of him. No doubt, Allah’s Apostle had sent him, and the incident of the Ar-Ridwan pledge of Allegiance happened after ‘Uthman had gone to Mecca. Allah’s Apostle held out his right hand saying, ‘This is ‘Uthman’s hand.’ He struck his (other) hand with it saying, ‘This (pledge of allegiance) is on the behalf of ‘Uthman.’ Then Ibn ‘Umar said to the man, ‘Go now with this with you.’
[Bukhari, Volume 5, Book 57, Number 48]
Not taking part in the battle of Badr and still getting a share in its booty and reward was a virtue unique to Uthman (radiallaahu `anhu). He had the intention to go and fight but Prophet (sallallaahu `alayhi wasallam) asked him to stay and look after his wife, Ruqayyah (radiallaahu `anhaa). She died before the army returned victorious. So on one hand, the Prophet was happy about the win over Quraysh, he grieved the loss of his daughter.