I think staying overnight at Kamakura is a great idea! I have visited Kamakura few times, but I always wish if I had more time to see everything.
There are so many attractions in Kamakura:
As Kamakura was once a capital of Japan during Kamakura Era, old beautiful temples are left and well-preserved. Temples in Kamakura attracts tourists each season. In early-summer, there are beautiful temples with hydrangea. In mid-summer, there is a temple with beautiful bamboo forest. In autumn, most of the temples are extremely beautiful with autumn colored leaves.
My favorites are Hasedera Temple (famous for hydrangea), Hokokuji Temple (bamboo forest), and Meigetsuin Temple (hydrangea is also beautiful but I love autumn colors here... especially beautiful when its seen through the circle window)
Even seeing around multiple temples needs a day or two!
Get on Enoden Train and get off at Yugahama Station. You will find a beautiful Shonan beach here! Along the beach line, there are lots of delicious looking restaurants, cafes, and cute little shops. Exploring this area is such a fun, and sand feels very nice here.
If you like surfing, you may be able to join locals to do some surfing :)
- Komachi Dori Shopping Street
It's a shopping street from Kamakura Station to Tsurugaoka Hachimangu Shrine. There are many interesting shops and street foods, but I went to a rental kimono shop here last time I visited Kamakura. Wore rental Kimono and walked around Kamakura felt very nice! I took lots of pictures with my friend.
- Enoshima Island
It is long time ago since I visited there last time, but Enoshima Island was also a fun place to explore. It is also called a "cat island", you can encounter with so many cats here! Near Enoshima Island, there is a big aquarium Shin-Enoshima Aquarium famous for jellyfish exhibition. Another idea to have fun time in Kamakura area.
As Kamakura is faced with sea, seafood is their speciality. Shirasu-Don (little sardine rice bowl) is a signature food in this area. Also they have a local brewery producing Kamakura Beer, you can try this beer at restaurants or shops in Komachi Dori Shopping Street.
There are lots of hip cafes in Yugahama Beach area, having atmospheres somewhat like Hawaii or San Francisco!
Kamakura has a long history, beautiful, and delicious food. It is a very recommended place. I love too.
It is a difficult question as to whether it is necessary to stay overnight. There are many places to see in Kamakura, but it is a place where you can enjoy it well even on a day trip from Tokyo. If you are interested in history and want to see all its charms, I think staying there overnight is a good idea.