We all waited in the sand under the sun.

------------------------------
Are 'we' on the sand or under the sand based on the sentence above?

In that sentence, we waited on (not inside or under!) the sand.

I think in this sentence your teacher is trying to get you to identify the roles of different segments of a sentence such as Subject/Verb/Object. So now its time for you to ask yourself: who is the subject in the sentence, what is the action that is being demosntrated by the verb and what is the object that is being acted upon by the verb. What can throw students are the additional descriptions or phrases that are extraneous to the main sentence.

HOpe that helps. :)
Come back and tell us what your teacher wanted you to know with this and your previous question. Thanks!

Based on the sentence "We all waited in the sand under the sun," it suggests that "we" are under the sun, not under the sand. The phrase "under the sun" is an idiomatic expression meaning outdoors or in an open space, not literally under the sun itself. Therefore, the correct interpretation of the sentence is that "we" are waiting in the sand while exposed to the sun.