There is an important relation between Lord Ayyappa and Shani which has resulted in the devotees of Lord Ayyappa wearing black dress during the Ayyappa Deeksha. Devotees of Ayyappa who perform the deeksha for 41 days wear the black dress as a mark of respect to Lord Shani.
Lord Shani is assigned with the job of giving trouble to people according to their previous wrong doings. It is said that he would cast his evil eyes on people for a period of seven years during which the person will face lot of troubles. He would lose his respect and get blamed for no fault of his and lose his wealth and health. He cannot eat his food properly and enjoy worldly pleasures. In short he makes life miserable during the period.
Lord Ayyappa asked Shani to spare his devotees from the trouble. But Shani said that even the Gods were not spared from his evil eyes and it was not possible for him to do that. Then Ayyappa said that his devotees would undergo the same troubles in the 41 day deeksha that Shani would have given them in seven years.
Ayyappa devotees wear black dress , do not shave , bathe in cold water, walk on bare foot and eat food only once in a day. But when all this would be done in a ritualistic and devotional way to serve Ayyappa , the troubles will not be miserable and hence the devotees will be protected. Lord Shani agreed to this and hence Lord Ayyappa devotees believe that by performing the 41 day deeksha religiously, they will be protected from the harmful effects of Shani dosha. This is the relation between Lord Ayyappa and Shani.