Does switching back and forth from a warm to a cold environment (going outside in the winter then stepping back in) weaken the immune system?

Immune system. I know of no evidence that this weakens a persons immune system. To the contrary some cultures e.g. The finnish and swedish peoples practice sitting in a hot sauna and then swimming in cold water which they feel improves their health.
Never say never. For most folks, dr. Pizzo's statement is spot on. There are a few people for whom cold may adversely effect health & immunity. Cold air is a common trigger of asthma. It's an uncommon trigger of hives & joint pain. Cold-induced hives or joint pain & swelling are rare but potentially serious immune problems that should be evaluated by a board-certified allergist as effective treatment is available.