Yes
When it is exposed to intense sunlight, it becomes Sunny Castform, and is Fire-type.
When it is exposed to rain, it becomes Rainy Castform, and is Water-type.
When it is exposed to snow or hail, it becomes Snowy Castform, and is Ice-type.
From Bulbapedia