The Starscourge are magic parasites that eat light, which seems to literally mean they block out sunlight from the world (but too much hurts them, hence why demons are weak to sunlight and bright fluorescent lights). People infected by the Starscourge eventually become demons (monsters). The Starscourge was created by Ifrit, who unlike the other 5 gods who either like or tolerate humans, was a giant dick and wanted to get rid of us.
The Crystal is the source of magic and light, gifted to humanity via the Lucian kings by the gods. The other countries apparently had crystals at one point as well but they were either lost or broken. When Noct goes inside the Crystal for 10 years he is basically absorbing its power so he can fight Ardyn. Ardyn himself used to use the Crystal to heal people of the Starscourge back in his day by absorbing the evil into himself, but he did it too much and became demonic himself (which is why he was "betrayed" by the Gods/'Izunia") They made him immortal so he could never enter the afterlife and took his kingdom from him, which is why he hates Noctis and his family so much.
Ardyn then worked with Ifrit to find a way to destroy humanity and the line of Lucii via the Starscourge and eternal night. Which involved Ardyn becoming Chancellor of the Empire and convincing the Emperor to wage a giant war on everybody to get rid of the crystals and start using magitech to to jumpstart the whole demon thing.
At least, that's how I understand it.