You would capitalise the word Earth when it is being used as a proper noun describing the planet Earth.
You would also capitalise it at the beginning of sentences.
If you are just talking about earth (soil), it would not be capitalised.
Hope that helps!
- For Teachers