Solar lights don’t run off the heat from the sun, they’re powered through the light from the sun.
So, yes, solar lights can charge through glass, as long as it gets regular access to natural sun light. Though, it is worth saying that charging through glass will see a reduction in your light's efficiency of as much as 50%.