Last night, while I lay thinking here,
Some Whatifs crawled inside my ear
And pranced and partied all night long
And sang their same old Whatif song:
The poem begins with the speaker describing something that had happened the previous night. Since the poet is a male, let us assume that the speaker also belongs to the same gender. Hence, we will be addressing the speaker as he.
So, coming back to the poem, it was nighttime, and the speaker was lying down and relaxing. Naturally, he started thinking about things in general- it could have been about something that had happened or about the future that is uncertain, or maybe both.
The speaker lies down thinking when the whatifs creeps in

So, while thinking, the speaker suddenly started imagining various unpleasant scenarios that may or may not happen. The speaker says how 'some Whatifs crawled inside his ear', comparing the act of having such thoughts to the movement of insects. It is possible to imagine that the speaker compares the same to a bunch of parasites as he was probably very annoyed by the 'whatifs'.
Some whatifs crawled into the ear like a bunch of insects

The line "Some Whatifs crawled inside my ear" could be further analysed. To imagine that something is crawling through one's ears is creepy. Unlike eyes and mouth, ears do not have lids, and hence, cannot be shut as and when we wish. So, the ear is so vulnerable that anything could crawl in without a barrier.

Moreover, according to the poem’s context, thoughts can be seen crawling through the speaker’s ears. Interestingly, ears are strategically placed so that they are closest to the brain- the source of thoughts. Hence, they become an ideal route through which something could enter one’s consciousness.
Ear is an ideal route to reach the brain
Also, conventionally speaking, the word "Whatif" must be written as 'what if'. However, in the poem, one could observe that the word "Whatif " is capitalised as a proper noun, written without a space as if it is a single unit, and been used as a plural. Hence, the 'Whatif' is no longer a question, but rather an object with a life of its own.

Back to the poem, we see that a group of Whatifs have crawled through the ears of the speaker. The speaker also provides an image of the Whatifs being active in his head. He says that he could feel the 'Whatifs' jumping and moving around his brain energetically. Moreover, the Whatifs became so uncontrollable that it partied all night long. To add to the speaker's woes, the Whatifs also kept singing their old Whatif song.
Whatifs pranced and partied all night long

Let us see that what the song is about in the following chapters.
Meanings of difficult words:
What ifA question which is used to ask about something that could happen in the future, especially something bad
CrawlTo move or progress like an insect; to move upon in or as if in a creeping manner
PranceTo walk (or jump around) in an energetic way and with more movement than necessary
PartiedA social event at which a group of people meet to talk, eat, drink, dance, etc., often in order to celebrate a special occasion
National Council of Educational Research and Training (2006). Honeysuckle. Whatif: Shel Silverstein (pp- 121 - 122). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.