In answering this question, I will assume that you are simply being assigned to write this essay without reference to any poems, plays, or the like. I will therefore give you some input on writing a general essay that reflects on this idea.
If the essay needs to be long, I would start with a reflection on places that people grow fond of. I might say that we grow attached to places that we think are beautiful. I might say that we grow attached to places that hold important memories for us. I might talk about how we grow attached to places that are convenient for us, that are comfortable, or that are interesting. I would give an example (or examples) of each of these types of places. I would then move on to what I consider to be the more important part of the essay.
To me, there are two interesting questions that could be addressed in an answer to this prompt. First, I think that we need to ask why we grow attached to places. Second, I think we should ask how our attachments to places end up affecting our lives.
I would start this part of the essay by reflecting on why we grow attached to places. I would look at each of the types of places that I mentioned in the second paragraph of this answer. I would try to think about why people get attached to such places. I would say, for example, that we people have an innate desire to appreciate beauty, particularly in nature. I would speculate that we feel called to nature because we long to be able to put off the burdens of civilization (such as work). This draws us to beautiful places. I would say that we are drawn to interesting places because we human beings are innately curious. We do not like to simply sit for long periods of time without stimulation for our brains and our imaginations. I would say that we like convenient and comfortable places simply because we have enough difficulties in our lives and we need to find places that reduce those difficulties. Most importantly of all, I would say that we grow attached to places with good memories for us because of the nature of our linear existence. We all know that the past can never come back. We all know that we will die some day. I think that we want to resist these inexorable, but unpleasant, realities. Therefore, we become attached to places that have been good for us.
I would then turn to the issue of how our attachments to these places affect us. I would argue that they give us comfort and happiness but that they can also be a danger to us. For all the reasons mentioned above, we need to feel attached to places. Because we feel attached, we can have happier lives. However, excessive attachment to places can retard our growth. If we feel too attached to the past, we will be unable to be our best in the future. If we are too attached to comfortable and convenient places, we do not push ourselves and put ourselves in places and situations that are more challenging to us. We stagnate and do not progress. This is the danger of growing too attached to places.
Hopefully this will give you some ideas for how you can go about writing this essay.
I would like to suggest that we often do not realize how attached we have become to a certain place until we find ourselves, for one reason or another, having to leave it behind us forever. At that point we can be strongly moved by a mixture of emotions, including those based on memories of people we knew there and events that occured there, as well as feelings of anxiety about what the future may hold for us in the new place we are going to. This is such a natural, common human experience that you must have had it yourself at some time in the past; and, if so, that occasion would make a great topic for you to write about. In other words, I am not suggesting that you write about being in a place but leaving a place and feeling sadness and regret at realizing for the first time how attached you had become to it. Many people feel this way about a school they have been attending and have to leave because they are graduating. Many prominent authors have written about places they were strongly attached to when they were young. A good example is the novel To Kill a Mockingbird by Harper Lee.
One approach for this essay could be a personal anecdote about your attachment to a specific location and why then expand this to be a possible reason why people grow attached to places. In other words, start small then spread to the universe. For example, maybe you'll discuss how you are really attached to your grandma's house. The reason might be that you used to visit every summer and even though you occasionally thought "Wow, I could be using this time to socialize with my friends instead", you ended up loving the trips every time because you enjoyed the calm that came with your grandma's house and how she always doted on you. Then you can expand your personal story to be a statement of people and how we grow attached to places not because of the location necessarily, but because of the memories and people we link to these locations.