S.O.I.L.S (this is the acronym we use to test the location of our gardens)
Sunlight
Observability
Irrigation
Level Surface
Security
Also noteworthy and worth considering: Convenience. You want to choose a location that you pass by regularly versus tucked in a back corner of your property. Out of sight is out of mind with gardening. You should pass by your garden regularly throughout the day to interact with your plants. Most gardening problems occur when we don't visit the garden for more than a week at a time.