Light may play a minor role in how long bread will store, but it's usually the least of your worries. The main enemies to bread's freshness are moisture, warmth and dry air. Storing the bread properly delays mold growth and the onset of staleness, but most breads should be eaten within 2 to 10 days or frozen.
Dry and Stale
Long before bread molds, it usually becomes stale. The crust becomes thick and leathery, and the inside of the bread becomes dry and crumbly. Light doesn't cause this, but exposure to dry air or cool temperatures can. Home refrigerators are typically set at 40 to 41 degrees Fahrenheit. At this temperature bread becomes stale three times faster than it would if stored at room temperature.
Fuzzy Gray Stuff
The mold you see on bread is a fungus -- neither plant nor animal. Unlike plants, which need light to produce food, mold can grow in complete darkness. Light neither encourages nor inhibits mold growth, although warm temperatures that accompany sunlight can accelerate mold growth. Mold grows most quickly under warm, moist conditions, but it can also grow in the refrigerator and freezer, thought much more slowly.
Making Bread Last
The best way to store commercial sliced bread is to keep it in its original wrapper and close it with a twist tie or quick lock. Store the bread at room temperature in a cool, dry pantry or a bread drawer. When stored this way the bread should stay moist, but mold-free for several days. Use the bread before the use-by date stamped on the package. For longer storage, stow the bread in its original wrapper, in a freezer set at 0 F. Freezing bread preserves its freshness for up to three months.
Exceptions to the Rule
Storing bread at room temperature might not be practical if you live in a hot, humid climate, because mold grows too quickly in this environment. In this case, store bread in the freezer and remove just enough slices for a few days. Homemade bread, French bread and artisan breads lack the preservatives found in commercial sliced breads and go stale or grow mold much more quickly. Wrap these breads in a clean kitchen towel or a plastic bag and use them within a day or two.
If bread has mold on it, discard it even if the mold hasn't infiltrated the whole loaf. Some molds can produce toxic substances which might not be visible. Stale bread, on the other hand, can be salvaged by heating it in an oven just until warm. The bread will momentarily become soft and moist again, but will harden again during storage. Eat it while it's warm.