Fact 1: cold fronts cause thunderstorms as they pass by. 
Fact 2: If cold air is advancing on warm air, the front is called a cold front.
Cold air advancing on warm air can cause a thunderstorm to occur.