These forms are not interchangeable. Unlike Spanish, and other Latin languages, you cannot ask a question by simply adding a question mark to a statement or changing your intonation. The interrogative form exists, and you have to use it. In the case of modals, auxiliary verbs and the verb 'to be', this involves an inversion of the subject and object. The correct question form is 'Were you there?'
The only time that a native English speaker would say 'You were there?' is to show surprise by repeating what we have just heard. For example, if your friend's grandad starting telling you about being in Dallas, Texas on the day that President Kennedy was assassinated, you might say 'You were there?'. In this situation you are echoing what he has just said, and you are asking him to confirm this surprising fact.