Ice melts when exposed to sunlight.

Literal

Ice [topic-は] sun [to-に] hitting [conditional-と] melts.

日にあたると溶ける — と conditional for natural consequence. 日にあたる means 'to be exposed to sunlight.' Another scientific-fact sentence.