Unless the grain of wheat falling into the ground die, it remaineth alone. But if it die, it bringeth forth much fruit. John 12:24
The obvious interpretation here is that earth is the domain in which the base nature of man is continually manifest - a biblical idea that is widely known through basic catechism, incorporating no commentary from Dostoevsky. As others have noted, the earth is also portrayed as life-giving and "good" with a rustic flourish. The interpretive complication lies in reconciling the goodness and fallenness of both earth and man at large. This I view as Dostoevsky's project: to address the incompatibility between the baseness of man and the holiness of his Creator, and to challenge the dichotomy of depravity and sanctity by presenting the earth as a domain not merely of the former, but as a place of reconciliation between both.
Mitya asks transparently: "can there be beauty in Sodom?" It is immediately answered that, for the large majority of people, beauty is found precisely in Sodom - but this answer neither satisfies the question nor comforts his frenzied rambling. It does no justice to the asking because the question of beauty is posed here not merely as aesthetic or humanistic, but divine. Beauty is "not only fearful, but mysterious," one of the undefinable riddles from God (to be experienced and not explained, much like how Levin finds Christianity in Anna Karenina) that "torment men on earth." Mitya's torment over this riddle betrays the true proximity of beauty to depravity; they are so similar that he does not know if he has gotten into "stench and shame or light and joy."
That divine beauty and depravity should be so close seems an unintuitive suggestion considering Dostoevsky's Christianity, but it also feels familiar. The theme of evil being close to good is introduced much earlier - most explicitly when Mitya's love for Katerina Ivanova was described as so intense that it is "just a hair's breadth away from hate" - and runs throughout the text. The licentious debauchee Fyodor Pavlovich fathers the pure and holy Aloysha; the holy fool Lizaveta births the slimy atheistic Smerdyakov. One man is at once "following the devil and also the son of the Lord," and so on.
The epigraph further clarifies the proximity of divinity and depravity: some type of fleshly death is not only parallel to divinity, but absolutely necessary for sanctity. The fall and death of wheat is a necessity. Without death, the kernel is finite and lifeless; only through death does it continually live and "bring forth much fruit." The earth into which the wheat falls is at once its deathplace and birthplace. Inspiringly, death and the fallen nature of man are presented not as finality but as hope of approaching the eternal.
Note that Mitya's awareness of his baseness and depravity is unstable - he is sometimes entirely an insect, other times partly an insect, and at other times the insect is external to him, infecting him like a spider bite - but it suffices to prompt him to confess his sins to Alyosha. Here, guilt prompts a confession even in the most base of men, but the confession is first told to an "angel in Heaven" and then an angel on earth. According to the sacramental status of confession in Russian Orthodoxy, he would need to confess before a priest for absolution, rather than telling it directly to an "angel in Heaven." Given that Aloysha is not a priest, there must be a deliberate "undoneness" and lack of ritual around this impromptu confession. It is not the Church that makes Mitya confess, but his own depravity prompting him to seek out God. Shame inspired a hymn in Mitya; he does not confound his baseness with beauty, even as he fetishistically delights in his shame. True beauty is found in looking to God even from the depth of his depravity.
Nowhere is the divine beauty of God obscured. A man lying dirtied in Sodom can, too, appreciate this beauty amidst his ugliness. It is precisely from this vantage point that many souls, such as Mitya, grope for a solution to the divine riddle. Because Sodom is depraved, it is in close proximity to beauty; within this proximity lies the pathway to rebirth and immortality - the bringing forth of fruit.