This is hopelessly vague. This book really moved me about 25 years ago - does anyone have any ideas?
It was about a girl. I think she might have gone on holiday; anyway, she goes off somewhere and meets a new friend, whose name I believe was Miranda.
All I really remember is that they were eleven years old and by the end of the book the girl had decided that Miranda (possibly a ghost?) was sent to her to help her learn how to be twelve (which was the age girls grew up and got their periods).
I have a vague recollection of a green book cover and of a garden/nature being important in some way.
I was moved myself by a book about the same time ago. It was also about a girl who went on holiday (Corwall ish perhaps, definitely a village with a small post office I recall). The girl who becomes her friend in the book did indeed turn out to be a ghost. She was called Marnie and the book was called 'When Marnie was there'.
As soon as I read your description I immediately thought of "When Marnie Was There". I don't remember the moment of realisation but there is a bit of the book that has always stayed with me when the girl gets caught out in the rain and then goes to the house of the family she is friendly with but has been feeling awkward with. She is sopping wet and says to the mother "I'm inside now" with the obvious inference that Marnie has taught her how to stop feeling like an outsider, and the mother says "Yes, you are".