(a) The plant is kept in dark so as to destarch it, so that in the beginning of the experiment itself, the leaves do not have any starch.
(b) After the plant is destarched by keeping it in dark, it is again placed in sunlight so that photosynthesis can occur. This would result in the synthesis of starch. The leaves are again destarched by boiling them in alcohol before testing them with iodine.