Firstly, congratulations on becoming a grandmother! It must be a very exciting thing to happen but also difficult to express your emotions on paper about such a wonderful event. In life, you can express your joy with hugs and kisses, even tears, but recording your feelings can be more difficult.
In terms of a
letter, there's no need to be formal, though writing down the date is a good idea, as your grandchild is sure to be interested as to exactly when you wrote to her.
Don't put yourself under pressure to get the letter right first time. Feel free to makes as many tries as you like. Perhaps jot down all the ideas and feelings running through you head in a list at first, then you can arrange them into something more like a letter next time round, in an order that makes sense when you read it back, with one sentence flowing into the next.
As for what to write, you could talk about what you were doing when you heard the news of the birth and the first time you saw the new baby. Or, write about the hopes and fears you have for the new arrival, what you think she might do when she grows up, or even write something about your own childhood, and how you imagine your granddaughter's early years might be the same, or different.
As for a poem, don't get too caught up in making it rhyme or keeping to a strict rhythm. As long as it's from the heart, your grand-daughter is sure to understand.
For more ideas, take a look at What Is A Poem About My Daughter Having A Baby Or A Letter From Mother To Daughter Having A Baby? If you are keen to write a poem, watch this YouTube film showing you some of the basics: