Most of the sunlight in a rainforest is intercepted by its canopy. Only about 2% of the light reaches the ground. How tall would a rainforest need to be to make it completely dark at ground level? Like the completely dark depths of the ocean.
It may not be possible with conventional plants alone as stated in another answer, but almost complete shade could be brought to the forest floor by the addition of another layer to the ecosystem consisting of:
Giant fungi. (Prototaxites)
Fungi, not needing light to photosynthesize could potentially form a multi layered "underforest" cutting out virtually all of the remaining light.
The highest layer being the bracket fungi attached to the tree trunks:
Beneath these would be the traditional shaped toadstools:
It's thought to have been the case at one time on Earth:
From around 420 to 350 million years ago, when land plants were still the relatively new kids on the evolutionary block and “the tallest trees stood just a few feet high,” giant spires of life poked from the Earth. “The ancient organism boasted trunks up to 24 feet (8 meters) high...”
Enough light must penetrate to the bottom of the canopy to keep the tissues there alive and productive. If the canopy of a forest becomes thick enough to block light completely, the leaves or needles at the bottom of the canopy will atrophy, die, and fall off. This limits the thickness of the forest canopy.
Since a layer of leaves or needles never stops all the light that reaches it, there will always be some light under a forest canopy during at least the brightest part of the day.
If you want permanent complete darkness at the forest floor you have to postulate an alien kind of tree that uses a solid web instead of clusters of leaves.
Adjacent trees would cause their webs to join up or abut exactly, since any overlapped part of a web would be an unproductive drain on a tree's energy budget. Alternately, the forest would be characterized by constant "web battles" that would make most trees wish they had leaves.
It doesn't matter
While it is true that the amount of light that ultimately impacts a surface generally follows an inverse square law, if we assume "reasonable" heights for your canopy and the distance from your planet to its sun, the difference between these is sufficient that we can effectively ignore fall-off.
That being the case...
What happens when light hits the top of the canopy is that:
- Some of it is absorbed
- Some of it passes through
- Some of it is scattered
The scattered light, if it hits a lower leaf, is going to bounce around your canopy (being attenuated each time, but still...) and eventually make it to the ground. Essentially, we can consider the light that isn't absorbed as light that we need to absorb lower down in order to accomplish our goal.
Now, it happens, this is essentially the same thing that happens with the ocean deeps, except that, instead of macroscopic leaves, you are dealing with individual water molecules doing the absorbing. Now, in theory, you can't stop "all" light, but your goal is to stop enough (99.99...% with enough 9's) so that, practically speaking, you've stopped "all of it".
The reason this works with water (oceans) is because you are more or less uniformly absorbing light across the entire depth. However, as A. I. Breveleri notes, forests don't work that way. In a "normal" (read: something we might find on Earth) forest, leaves exist to absorb light. At some point, there is not enough light to absorb for it to be worthwhile for the trees to put out leaves at that depth, which means, practically speaking, there is a limit to the amount of light a forest canopy can absorb. (This is why you have a "canopy"; leaves at the top, close to the light, with a lot of "empty" space underneath.) This, in turn, is why the height doesn't matter. Essentially, there is a limit to the depth of leaves that your trees will grow. Once you reach this, going taller doesn't reduce the light (much; see first paragraph), it just increases the distance from the canopy to the ground.
In order to overcome this, you need to alter the cost/benefit ratio of growing "stuff" in the lower layers of your forest. You could do this by having leaves that are productive with very little light, thickening your canopy, or you could fill the understory with something that is less light dependent (e.g. fungus, as mentioned by We are Monica). The rate at which light penetration is reduced will depend on your approach. Thus, the question as originally worded, doesn't really make sense.