Fluorescent carbon dots (CDs) have received great research interest in recent years, with applications in areas such as bio-imaging and chemical sensing. However, solid state photoluminescence of CDs and its related applications (e.g. optoelectronics) is a less explored territory. Here, we have systematically studied the photo emission of CDs in solid state. We found that their blue emission is highly dependent on whether the environment contains polar groups or not. Mechanism studies show that the blue emission of CDs may come from their C=O bonds conjugated with aromatic carbons, and the interaction between polar groups in environment and C=O bonds in CDs is responsible for the environment-dependent photo emission. Our conclusion here should assist the development of CDs' solid state applications.