Gardens definitely have a strong symbolic tradition in Western cultures going back, of course, to the Biblical Garden of Eden. Like the Garden of Eden, the Secret Garden is a contained piece of earth originally meant for two people—Archibald and Lilias—to celebrate their love. Unlike the Garden of Eden, though, the Secret Garden is a refuge from the larger, harder world. Archibald and Lilias share this garden as their own, personal, private, manageable haven—perhaps partly so that they can escape from the demands of the day-to-day real world.
Once Lilias dies tragically in the garden, Archibald seals it off under the mistaken impression that she is gone from him forever. But later, Mrs. Sowerby assures Colin: "Thy own mother's in this 'ere garden, I do believe. She couldna' keep out of it" (26.79). So the garden is also a spiritual place of connection to Colin's long-dead mother; once Colin spends more time in the garden, he is able to look at his mother's portrait again and Archibald has his fateful dream of Lilias calling him back to Misselthwaite Manor.
So the garden appears to be the home of the ghost of Lilias, and it was also created as a refuge from the rest of the world. It has one more major symbolic function, though, which is fairly explicit in the book: When Mary first finds it in a complete state of neglect, she starts to bring it back to life. And as Mary works to renew the garden, she finds herself getting better and better. And as the garden improves, the neglected heart of the Craven family begins to regrow as well, so that Colin, and at last even Archibald, starts to come alive again.
In short, there is definitely a connection here between the act of planting and nurturing a garden and the process of making yourself a better, happier person.
We have a last question, though: If gardening is so good for you, then why doesn't Mary's early effort to create a garden in the first chapter work at least a little bit to improve her mood? Check it out:
[Mary] pretended that she was making a flower-bed, and she stuck big scarlet hibiscus blossoms into little heaps of earth, all the time growing more and more angry and muttering to herself the things she would say and the names she would call Saidie when she returned. (1.5)
We think the difference between Mary's fake hibiscus garden and the real Secret Garden is one of attitude: Mary is spending all of her time thinking of horrible names she will call her poor nanny Saidie when she next sees her (though, as it turns out, she'll never see Saidie again). She's also not planting real flowers or wondering about how these hibiscus blooms will do in the earth with no roots or water.
Mary doesn't have either the positive state of mind or the know-how to take care of anything at this stage of the novel, so no wonder she's just getting "more and more angry" as she plays with her hibiscus flowers. We don't want to get too Zen about this, but Frances Hodgson Burnett seems to insist that you have to have the right attitude toward living things to garden properly, and Mary definitely doesn't have the right attitude in this first chapter.
As a small side note, all of The Secret Garden's beautiful descriptions of the positive spiritual influence of working in a garden are based on Frances Hodgson Burnett's real-life experience in her garden at Great Maytham Hall in Kent, England. She wrote The Secret Garden there in 1910, and you can still visit the estate or, weirdly, rent an apartment there.