The negator bú (不) in the sentence 你昨天為什麼不去參加婚禮 (nǐ zuó tiān wèi shén me bú qù cān jiā hūn lǐ) negates the subject's intention/willingness of going to the wedding. bú (不) is used to negate anything other than eventive actualization, and the semantic meaning of the sentence is "Why didn’t you want to go to the wedding yesterday?"
However, the negator méi (沒) in the sentence 你昨天為什麼沒去參加婚禮 (nǐ zuó tiān wèi shén me méi qù cān jiā hūn lǐ) negates the actualization of the event of going. Semantically, the sentence means "Why didn’t you go to the wedding yesterday?"