Almost all vegetables and food need full sun which means 8 hours of sun light a day. There are some vegetables that do not produce a fruit that can tolerate some shade such as lettuce and spinach and some herbs. If too much shade is on your garden, it will significantly reduce your harvest. So when looking in your yard for the right spot, it might not be the easiest spot to use, but choosing the sunniest location will be the best. Morning sun is a great way for plants to start their day, so if the option is afternoon shade or morning shade, choose afternoon shade.
You will also need to take into consideration watering when choosing your location. The best option would be to run a sprinkler line underground to your garden so that you can install a drip irrigation system to automatically water your garden for you. But if you do not have that option, make sure that your hose will reach your garden before planting. They will most likely need additional watering after being planted.
Soil is also an issue, but if it is not conducive to growing vegetables, no fear. Simply build raised beds with or without a boarder surrounding it, and then you can add as much extra soil and amendments needed to create a nice loamy soil for your plants.
It is a nice option to have easy access to your garden so that you can run out to the garden and harvest a few things for lunch or dinner, but alas that is just a luxury that not everyone can have.
Conclusion: just remember sun and water as the most important for location of your garden.