Light to the roots stresses and confuses the plant, which produces hormones partially according to how light hits it.
Algae also needs light, and is likely to grow in your soil if the container is clear.
For small seedlings, I have used plastic cups with no apparent problems BUT and this is important, as soon as you see roots visible, transplant into something lightproof.
Take a bottle of black spray paint to your milk jugs (outside only). Problem solved.