simplest way to connect solar panel to water heating element
A better way would be to hook up an MPPT solar controller to a small battery or supercapacitor, and then separately have a controlled relay that the turned the heater on and off based on the battery