Humanities transition from hunter/gatherers to farmers takes place at various places on the globe following the end of the last ice age approximately 10.000 to 4.000 BCE. This pivotal event in humanities development must have occurred under a naturally occuring stress in the environment that prompted this change.
What we can already logically deduce, is that after the last ice age, a shift must have occured leading humans to lean more on their gathering skills than on their hunting skills. as the ice receded and global temperatures began to rise again, animals migrated away north and south. On the other side an increase in warmth and precipitation would spur the growth of plants and make it easier to gather berries and fruits.
Keep in mind that farming is still gathering, except the place of growth is forced on the plant instead.