I can't answer for the Blue Angels or the Thunderbirds, but I can for the UK equivalent, the Red Arrows.
The Red Arrows have no spare pilots (or 'B team'). The nine pilots on the team fly every display in their 3 year tour. The explanation is that a spare pilot would not fly frequently enough to be current and safe. They do however have the capability to do an 8-plane display (rather than the usual 9) which they can use if a pilot is temporarily incapacitated. They also have a spare plane, something I know also applies to the Thunderbirds.
In the event of any kind of serious accident, it is likely that displays would be suspended for at least a while, in order to investigate and also out of respect. If all pilots are available when displays resume everything would be normal, using the spare plane if required. If a pilot was out for a short time they might fly the 8-plane display. The Arrows fly standard planes with minimal modifications, so presumably a new one could be readied fairly quickly.
In 2010 when Flt Lt. Ling was injured too badly to continue with display flying he was replaced by a pilot who had already flown with the team in a previous season. There was sufficient time before displays recommenced to make the "new" pilot current and safe.