Carrots as wartime propaganda
Carrots are fairly innocuous looking things. You wouldn't think that a pointy, orange vegetable would be a useful tool in an intelligence arms race. During the Blitz, however, they were utilised by the British Ministry of Information as a red herring to distract German intelligence agencies.
The German army was puzzled by the RAF's ability to take down their planes in the darkness. The Luftwaffe would bomb cities at night to avoid detection so the British government issued blackouts to make it more difficult for the German pilots. Despite this darkness, the British were extremely proficient at shooting down German planes, often before they had even crossed the channel.
The secret to the RAF's success? Carrots! Well, in a way. Carrots stopped the German army from discovering the real reason, which was a state of the art radar system. The on-board Airborne Interception Radar (AI) could pinpoint the enemy bombers' locations from considerable distances. There was no way that the British government would let their enemies figure this out, so they utilised the Ministry of Information in an ingenious scheme.
British citizens were urged through posters and newspaper reports to consume a decent dose of carrots regularly to help them cope during a blackout. It was claimed that British pilots had been doing so in order to take on the Luftwaffe. Whether the German intelligence services completely bought into this or not is debatable but, most importantly, they did not discover the radar system. The concept that carrots help you to see in the dark is also present in German culture too, so perhaps the campaign did work to an extent!
There you have it, the truth behind the claim that carrots help you to see in the dark. Hopefully, that doesn't destroy the trust between you and your parents, they were only looking out for you when they said so!