The nine planets are collectively known as Navagrahas. They are worshipped in Hinduism for good luck or to overcome adversity, bad luck or misfortune arising from past karmas or birth related defects (dhoshas).
Of the nine deities, seven are named after the planets in the solar system, and correspond with the names of the seven days in the week of the Hindu calendar.
The remaining two deities are actually demons who managed to gain a place in the pantheon through an act of trickery. Their names are derived from either comets or from the dark and somewhat hostile planets of the solar system (Neptune and Pluto).