Meaning: The sunlight was shining through the trees in a beautiful way.
Choice of Words: Sunbeams are rays of sunlight. Ballerinas are dancers who wear tutus and dance gracefully. So, the sentence means the sunlight was shining through the trees in a graceful and beautiful way.