If the charging station and the solar panels are connected to the same grid connection (= the same electricity meter of the grid operator), the energy produced is always charged. However, it is not the case that you can manage the energy smartly and only charge with solar energy.