No, we don't have a definitive answer. We are very good at describing what happens when we sleep and what goes wrong when we don't, and so there are a number of theories as to why we sleep. But a definitive answer? There isn't one (yet). Here is the most likely theory according to Wikipedia:
>The essential function of sleep may be its restorative effect on the brain: "Sleep is of the brain, by the brain and for the brain."[95] This theory is strengthened by the fact that sleep is observed to be a necessary behavior across most of the animal kingdom, including some of the least evolved animals which have no need for other functions of sleep, such as memory consolidation or dreaming.