Plants contain a type of pigment called phytochrome, which are sensitive to light. Phytochrome exists in two forms: phytochrome red and phytochrome far-red. When sunlight (which contains red light) shines on the plant, phytochrome red is converted into phytochrome far-red. When a plant is in darkness, any phytochrome far-red present converts back to phytochrome red.
Dormant seeds will only germinate when there is plenty phytochrome far-red present, and no phytochrome red. This ensures it only germinates when there is high enough light intensity, so that there are suitable conditions present for the plant to photosynthesise and grow.