The usual solution to this is a dummy load, or 'active load'. These are pieces of test equipment specifically designed to consume a configurable constant current. Many can also measure and accumulate the total number of amp hours or watt hours consumed.
You said yourself that depending on what part of the charging process you are in, you keep the current constant or try to maintain that voltage. That's going to require some kind of controller, though not necessarily PID or some subset thereof.
The characteristics of a charging battery change very slowly relative to what even a slow microcontroller can measure and react to. Batteries also don't exhibit second order effects like inertia, like motor speed as a function of current does. Both these together allow very simple control schemes to work well.
Probably about the simplest control scheme for a switching power supply is pulse on demand. It is always stable and robust, although results in more ripple than a more finely tuned control scheme can accomplish.
When the output is below the regulation threshold, you do a pulse, else you don't. To avoid inductor saturation, you may always not do a pulse at the next slot immediately after a previos one, but that's a detail.
I've done pulse on demand switching power supplies with the PIC 10F204 a bunch of times. The code spins in a loop checking the comparator output as long as it is indicating the output is above the regulation threshold. When the output falls below the threshold, the code following the loop is executed, which produces a pulse. The instruction cycles to jump back to the top of the loop and do the next comparator check usually take enough time so that it's OK to do the next pulse righ away if the comparator indicates the output is still below the threshold.
Sometimes this can go meta-stable by producing two pulses in a row before the feedback catches up to the output having gone higher, but in all cases it remains stable as long as the maximum load isn't exceeded.
This sort of system is fine for battery charging, except that you have two thresholds, one for voltage and one for current. You only do a pulse if the output is below both. The higher level logic can adjust the limits as the battery progresses thru the charging procedure.
Best Answer
When to monitor?
All the time! You need to be in control of what you are doing at all time. If there's an overvoltage or overcurrent, you need to detect that fast and cut the power out.
A battery charger is normally regulated in current, which means you set a charge current and don't really look at the output voltage of your buck (which is anyway biased by the battery). Therefore you will control the PWM based on the current reading, making a regulation loop. A PI regulator may be well enough for your application, or you may go more complex if you need fancy stuff such as power factor correction on your input (but I doubt you do).
Also, since your battery voltage will raise when pushing current inside the battery, you will need to occasionally stop the charge current to read the battery voltage at open load. This will help you correctly find the actual State Of Charge (SOC). For some type of battery, the voltage is enough, for some other type (such as LiFePo4), there's a flat section in the V/SOC graph. In that case, you also need to keep track of the current you inject in the battery to know your SOC.
How to monitor?
With a voltage sensor circuit and a current sensor circuit of course. A voltage sensor circuit is often a simple resistive voltage divider. For the current sensor, @mkeith comment is very relevant. You can go with an option where the current pass through an IC that measure it, or you can put a small serial resistor in series with the battery and measure the voltage drop with an differential amplifier designed for that.
simulate this circuit – Schematic created using CircuitLab
I only drew the main parts. To do a good charger, you would need some protection circuit to resist short circuits, ESD discharge, harsh electrical environment, unstable source, etc. You may even want to consider redundency in the sensors for safety. All depends on your application.
Good luck