Sure you can! I grew veggies on my apartment balcony for years before we moved to a place where I could have a egular garden. Best luck with tomatoes, sweet peppers and pole beans.
1) Get a few of those big extra deep plastic buckets from someplace like Home Depot (contractors use them for plastering,etc.)
2) Use a mallet and a big screwdriver and poke a hole in the bottom of each one.
3) Use a good quality potting soil - NOT topsoil, which won't retain enough moisture in the bucket. Fill part-way and get bedding plants for your tomatoes and peppers. For the tomatoes,look at the labels. Any kind will grow in a pot, but some work better than others. Cherry tomatoes are great if you don't have much space. Plant them and put them in the sunniest spot you have. Get some tomato cages or poles to stake them up on once they've started to grow.
4) For the pole or bush beans, buy a seed packet and just follow the instructions. If you do pole beans, buy some bamboo poles and when the plants appear, stick them into the bucket, so the beans have something to climb. Ask at a garden center which variety to get - Blue Lake is a good one- as some produce only once a season, but others will keep producing beans all summer, as long as you pick them.
Just make sure to keep the soil soil moist, not soaked and get plenty of sun. You can also get a fertilizer to feed them once in a while. My son is 10 now and we garden together and it is great! Hopefully you and your little one will be out picking beans and tomatoes for a long time to come!