Chocolate gets hard in the fridge due to a process called "crystallization." Chocolate contains cocoa butter, which is a type of fat. Cocoa butter has several different forms of crystals, and the type of crystal structure formed in chocolate greatly affects its texture.
When chocolate is made, it is carefully tempered to promote the formation of stable and desirable crystals. Tempering involves heating and cooling the chocolate to specific temperatures to encourage the formation of beta crystals, which give chocolate a smooth and glossy texture.
However, when chocolate is exposed to temperature fluctuations, such as being placed in the fridge, the cocoa butter can undergo a process called "fat bloom." Fat bloom occurs when the chocolate experiences temperature changes that cause the cocoa butter to crystallize in different forms. This leads to the formation of small, non-uniform fat crystals on the surface of the chocolate.
When these crystals form, they create a rough and grainy texture, making the chocolate appear hard and less appealing. The fats in the chocolate become less stable and can rise to the surface, causing the bloom. Additionally, the condensation of moisture on the surface of the cold chocolate can contribute to the bloom.
While the chocolate may still be safe to eat after being in the fridge, the texture and appearance may be compromised. For the best quality, it's generally recommended to store chocolate in a cool, dry place, away from temperature fluctuations.