When everyone starts tending the garden, are they escaping the evil of society or is there a deeper meaning?
Yes, in a way it is a cloistering from the harsh realities of the that left their literal marks on Candide and his friends. In a world of self-centered, greedy, and thoughtless people, one must be able to find solace in something personal and comfortable.
Consider Candide's garden like your home. Where are we most at ease, the most comfortable? Where can we truly be ourselves and choose what we let in, what we allow to influence that environment? Where can we go when the world has let us down — a place that we can recuperate — to tend our garden, so to speak?
Candide needs his garden, like we need ours. The garden also gives him something meaningful through which he can occupy his time; it is something that needs him and that allows him to feel as if he has a purpose. Here, we can't help thinking of that archetypal garden, but Adam and Eve had to earn their place there through suffering, much like Candide had to do.
The garden is Voltaire's optimism, and not an ironic one. Candide's end suggests that we can, in a community, find a purpose in life, a way to help others, and a way to involve ourselves meaningfully in a community.