"If I am approaching a Class C or Class D airport and my radio goes dead, what do I do? This is assuming a VFR flight. What if I see a flashing red light from the control tower?" - Ainaras
“A prerequisite for entering Class C airspace is establishing two-way communications. If you experience a radio failure, you will not be able to enter Class C without prior coordination.
If you have already made contact with the Approach facility and have been given a transponder code with instructions to enter the pattern, then squawk 7600, continue and look for a light gun signal.
At a Class D airport, if the radio failed prior to making initial contact, stay out of the Class D and land at a non-towered airport. If you made initial contact and received instructions to enter the pattern, then squawk 7600 and look for a light gun.
A flashing red light in the air means the airport is unsafe – do not land. Do exactly that – do not land. Continue above or outside the traffic pattern, maintain visual contact with the tower and wait for a green light. If no green light is received after a reasonable amount of time, depart the pattern and land at a suitable non-towered airport.
The AIM Paragraph 4-2-13 has more information on these procedures.”