The windmill generates a steady stream of energy, and more if you tap it. Levelling it up increases your earnings per minute and per tap. Its level also determines how much energy you get from watching ads at the cargo ship.
Without the energy of the windmill, you can’t create new habitats or tend to the rain and sun needs of your various creatures. As in reality, the weather changes continuously on your islands and you will need energy to keep your terrain watered or sunned the way you like it. If you want a lush, richly populated island, you will want to spend some of the free gems you earn to upgrade your windmill early in the game.
If you’ve been away from your game for awhile, you may have to watch an ad to redeem the energy you gained while you were gone.