Yes, solar lights still charge if switched off. There are two separate connections in a basic solar deck light. First is the connection between the solar panel and the battery, and the other is the link between the battery and the LED light. Switches only control the connection between the latter and do not affect battery charging.