Of course you can although, as another poster mentioned, it might be better to use mirrors to focus rather than lenses. Lenses made of glass are heavy/expensive and plastic ones tend to degrade in the sun after a few months/years.
It really comes down to cost and efficiency. You can search up CSP (concentrated solar power) generators. There are some already constructed although their commercial success is somewhat in doubt.
There are rooftop solar water heaters as well.
This is called solar thermal power, where you have a large field full of mirrors focusing the light to heat up molten salt. But if you lookup Crescent Dunes Solar Energy Project, they’re obsoleted by photovoltaic solar farms that generate more energy on a far cheaper budget. The molten salt advantage is they can still generate power even after sunset, but at that price difference utilities just choose to use other storage technology.
Another study case is Ashalim Power Station, initially, it was two plots consisting of the tallest solar tower in the world and parabolic trough of similar capacity, but later expansion are the cheaper photovoltaic solar farms.
Lenses are like magnifying glasses – they can focus sunshine into a tiny, hot point. That sounds like it would be perfect to heat water or make electricity! But lenses have a big problem. The sunshine moves all day long as the sun goes across the sky. The angle of the sunshine is different every hour. Lenses can only focus sunshine from one angle at a time, so for most of the day the focus point won’t be in the right place.
To make best use of solar power, we need something that can collect it from all different angles. Solar panels with lots of separate little cells do that. Each cell grabs a bit of sunshine and turns it into power, no matter what angle the sunshine hits. It’s like having a bucket with many tiny funnels instead of one big lens. More complicated, but it catches more sunshine overall.
So lenses aren’t flexible enough for good solar collectors. But they ARE still great for focusing sunshine to melt marshmallows or ant hills!
Latest Answers