The situation is as following - I requested flight following at approach, got a squawk and instructed to maintain VFR with heading and altitude at my discretion. My route is through class D and class C airspace for the altitude I chose. The question is - should I establish additional communications or report to the approach controller about flying through the class C and D airspace, or I am already permitted to do this?
Lets back up a minute and discuss what is required to enter C and D airspace.
For C and D airspace you must establish 2 way radio communications with tower or approach controller. Let's first discuss how this works if you are not taking Flight Following. As you approach Class C airspace you hail them and wait for a response, for example,
You: "Allentown Approach Piper 1234J @ 3000 en route to Queen City Municipal"
Controller: "1234J Squawk 1-3-5-2 and Ident"
Since the controller responded with your tail number you may enter the Charlie airspace (Delta has the same requirements).
Now when you are under Flight Following, ATC will coordinate a handoff to the Approach or Tower for the airspace you are about to enter, or ATC will say "radar services terminated," and you must contact the controller/tower yourself before entering.
You SHOULD NOT change frequencies until you are told to do so, since ATC may be trying to give you a traffic advisory. You can however tune your second radio (if you have one) to the approach/tower you are approaching, and begin to monitor traffic.
As per JO 7110.65W ATC, Section 2-1-16 SURFACE AREAS, when you are in contact with ATC, you do not need to specifically ask for authorization to enter a towered service area:
The pilot is not expected to obtain his/her own authorization through each area when in contact with a radar facility
And to follow @vortaq7's point, if you lose radio comms with Flight Following AFTER you've entered the Class C, the regs are a bit unclear. It kinda boils down to FLY THE PLANE + USE GOOD JUDGEMENT. Definitely try to re-establish comms with someone related to the Class C, but you don't necessarily have to leave ASAP or squawk 7600. If you're landing inside the Class C, or transitioning close to the tower, look for light guns, otherwise, try to be _predictable_. If the tower can't talk to you, at least they can direct other people around you if they can tell what your intention is.