My husband and I have a tendency to plant green things wherever we live, no matter how long we end up staying. This has led to traveling gardens (we moved quite often for awhile), and has caused us to appreciate the roots we have planted in our new residence. A home, no matter the location, never quite seems complete without something edible growing nearby.
We have lived in several locations where the only option for our gardening enthusiasm has been to participate in a community garden. This is a wonderful option for those living in apartments with little to no outdoor space. Check for community gardens in your area, or start your own. If you have a local church with some space for vegetables, talk to leaders in your congregation about starting a church garden for families to participate in.
Container or Box Gardens
Several of the apartments we lived in had small porch areas with space enough to plant some vegetables. At one location my husband built a wooden container to hold a garden space, and another apartment porch held pots of varying sizes and plants. Evaluate the space you have available and the vegetables you would like to grow. Even if you only have room for a tomato plant or two, the fresh taste of the produce you grow yourself will be worth your efforts.
Even though I now have the space to grow plants outdoors, I like the convenience of having some herbs and small plants in my windowsill. If you have good natural light coming through your window, then you have enough sunlight to grow some herbs like cilantro or basil, as well as some salad greens.