Iodine test for Starch
The amylose present in starch is responsible for the deep blue colouration.  The structure of amylose consists of long polymer chains of glucose units connected by an alpha acetal linkages. All of the monomer units are $\alpha$ -D-glucose, and all the alpha acetal links connect $C1$ of one glucose and to $C4$ of the next glucose.

As a result of the bond angles in the acetal linkage, amylose actually forms a spiral structure. 

X-ray diffraction studies$^{[1]}$, demonstrate that the amylose is organized as left-handed helices, which have outer diameters of 13 Å and a pitch of 8 Å, with each turn of the helix corresponding to six 1,4-anhydroglucose units. The iodine components are linearly arranged in the 5 Å wide inner cavity of the helices with an $\ce{I–I}$ distance of approximately 3.1 Å. 

Starch-iodine complexes show dichroism of flow$^{[2]}$, i.e light with its electric vector parallel to the flow lines is more strongly absorbed than light with its electric vector normal to the flow lines. The dichroism of flow is shown to require that the long axes of the iodine molecules in the
complex be parallel to the long axis of the starch iodine complex. 

The exact structure of the polyiodide chain remains contentious, however, the following species are commonly implicated as key elements of the substructure: 

$$\ce{I2 + I^- -&gt; I3^-}$$

So, ignoring the structural specifics of the polyiodide chain, one notes that if an iodine molecule enters the internal channel of the amylose
helix, it may be surrounded by about six glucose residues. The following image is from reference (3):

Bear this image in mind, and note that the hydroxyl oxygen is pojected into the helix cavity.

Also, when iodine is dissolved in ether or alcohol, a new strong absorption band appears in the near ultraviolet region. In relation to the study of the benzene-iodine complex, Mulliken postulated the complex formation
between iodine and ether or alcohol, and explained this new band by the concept of intermolecular charge transfer spectra$^{[3]}$.

The "simple" idea behind a charge transfer complex is given below: 

$$\ce{I2 + D -&gt; I^{\delta -}...D^{\delta +}}$$ Reference 4 gives more details. (It also likens this bonding to a "hydrogen bond" if that helps, you understand). In this case, D is the donor atom (electronegative atoms like nitrogen, oxygen etc.) 

The iodine-donor distance is usually in 2~3 Å range. Thus, based on all of this one can conclude that possible charge transfer interactions between oxygen atoms that are projecting in towards the helical cavity and the iodine molecules in the polyiiodide chain are responsible for the colouration. You can view how the oxygen molecules are pointed towards the chain of iodine here. (I recommend rotating the diagram so that the axis of the cavity is towards you, and you are essentially looking down the tube)

References

1.https://www.researchgate.net/publication/244335699_The_complex_of_amylose_and_iodine 


http://pubs.acs.org/doi/abs/10.1021/ja01244a017
http://scitation.aip.org/content/aip/journal/jcp/22/3/10.1063/1.1740076 (I recommend reading this if you are not satisfied with the brief, qualitative discussion I have provided here)
Inorganic Chemistry (Nils Wiberg) (google books, relevant portion is part of the preview)