Although C and Si both have valency 4, C is a non-metal while, Si is a metalloid.
In CO2, C behaves as a non-metal and two double covalent bonds are formed between C and O atoms. So, as in covalent compounds, weak Vander Waal's force exist between the molecules, CO2 molecules have big intermolecular spaces and it exists as a gas.
While in SiO2, Si behaves as a cation and O as anion. So, electrovalent bond is formed between the Si and O. As strong electro-static forces exist between the ions in an ionic compound, SiO2 exists as a solid in room temperature.