How to monitor produced energy?
Energy is the time integral of power and power is the terminal voltage produced by the solar panel multiplied by the current taken from the panel. So, if you monitor both voltage and current and do some math you get power. This can then be integrated to produce watt-seconds (joules).

Because your system is DC I would consider using a small series resistor in the current path, probably in the range of 10 milli-ohm. The voltage across it is proportional to current (via ohms law) and this can be easily amplified and fed into something like an arduino. The voltage can also be monitored and also fed into an arduino. The arduino could then multiply voltage and current to get power. The arduino could also time integrate power to get energy.