In short, this event was precipitated by the 1845 Rebellion Losses Bill. The country had experienced political problems and upheaval from 1837 and 1839 — a civil war. The bill was meant to compensate certain inhabitants in Lower Canada, for losses incurred during that time. The opposition thought it was akin to “paying the rebels”, and that “rewarding” the rebels was an insult to the “loyalist.”
The rioters broke windows and gas lamps, and then broke into the Parliament buildings and vandalized them. One of the rioters even sat in the Speaker‘s chair and declared the dissolution of the house.
Would you like read more about these riots? I recommend visiting Wikipedia’s Burning of the Parliament Buildings.