The color of your hearts is an indicator of whether or not you can make it to the next camp before passing out.
If your hearts are Red, you will not make it to camp before running out of energy.
If your hearts are Yellow, you are cutting it close and may not be able to pick up more items along the way.
Green means you're good to go!
You may see that you have very little energy left and when the hearts turn red. As you may have expected, this means that you will run out before reaching the next camp.
You may also see that you have full hearts but they are still red. This means that you are carrying a lot of things, have equipment that will break before you can repair it, or are running too fast to make it to the next camp without passing out or eating.