Synthesis of 1-iodo-4-nitrobenzene
Here are some things to focus on:


How quickly\slowly did you add the diazonium salt to the NaI solution?
Did you maintain the reaction temperature below 10°C during the entire addition?
Did you also keep the diazonium salt cooled while adding it?
After addition was complete, did you let the reaction stir at 10°C until nitrogen evolution ceased and then let the reaction slowly warm to room temp? 


Here is a tested lab procedure for the preparation of 4-iodonitrobenzene.  Compare it to your notes and see where you differed.

Keeping the reaction cold during the addition is key. If the diazonium salt warms up too much, the diazonium can react with itself (coupling) to give colored by-products.  The diazonium ion can also eliminate nitrogen to generate the extremely reactive phenyl cation which will react with any nucleophile around, water for example (see page 6, the Mechanism section in this reference).  Both pathways can  contaminate and reduce the yield of the desired product.