Significant (and practical) energy capture - probobly not. Indirect energy capture, like warming water during the day time and then using that water to warm your home at night - sure. Pretty sure that's already done in a few places.
But electricity generation from day to night time temperatures - that's hard. The most practical way (that I can think of) is you need something that readily freezes or liquifies at night and readily turns into a gas during day and that can be used to push turbines. Energy output is limited to how much freezes at night and how fast it expands into gas during the day. That's the principal behind Ocean Thermal Energy (OTEC), where in the warm ocean you have surface temps of maybe 27 or 28 degrees C and in the deep ocean not too far down, close to 4 degrees C and you run a contained liquid through it that condenses in the 4 degree water and expands back into a gas at the surface and pushes a Turbine to generate electricity. It's an idea that's been on the drawing board since the 70s but it's not practical or cost efficient.
Ice expansion is also difficult as a form of energy generation. When Ice forms it expands with great force but very little volume, so you can lift heavy objects but not lift them very far. That's not convenient for energy generation. The expansion of water from 4 to 0 degrees that you mention isn't enough expansion to generate energy from at all. The expansion from water to ice might be, but that's very difficult. Significant expansion, like water into steam, is far easier to work with as an energy source, as is consistent movement, like a waterfall.
It's a cool idea (pun not intended), but hard to do, and not highly practical or cost efficient.