Renters who live in a one- or two-unit building cannot be prohibited from growing food in portable containers and in areas of the backyard approved by the landlord. This applies only to backyards, not to front yards or balconies. Even in backyards, landlords may still place restrictions, e.g. limiting the size of the garden.
Read your lease: if it doesn’t have restrictions, you can do what you want in your backyard.