The cloud does not actually shift from the first to the third person. The cloud continues to be the speaker, speaking as "I," throughout the poem as he narrates his experience of being a cloud. What shift were you exactly refering to, and what do you mean by the change in person?
This poem is in first person, from the cloud's perspective.
At the beginning of the poem, the cloud is describing the good things it does, like bringing "fresh showers for thirsting flowers" but toward the end of the first stanza the cloud sort of becomes violent, describing rain and hail. In the second stanza the mood shifts back to more pleasant things, as the cloud sleeps.
The cloud and thunder are two different entities. When the cloud says "he" this means the thunder. The cloud is not referring to himself. He is distancing himself from the thunder.