First, to everyone that says pinch yourself to find out. If this world was a simulation, the feeling you got from pinching yourself would be simulated as well. So that would not work. Same with emotions, as they would either be one of two things, your real emotions translated to your virtual avatar, or if everything is simulated then they would just be a sub-routine running in the complex AI that makes up your consousness.
Also claiming that God created us and so there it is does not work either. God could just be a programmer that ran the simulation, or a player even.
As you can probaly see, there is no way to find out if you are in a simulation, WHILE you are in a simulation. You have to be on the outside looking in.
This same question is brought up in phliosphy all the time and was started by the Greeks. It basicly ponders that your reality is goverend only be the information that you have availible. The original story is about a man in a cave that sees the shadows of people walking by. He has only been in the cave his whole life and only seen the shadows, but he can hear the people talking as well. Because of his limited information his reality is the shadows are the ones talking.
So even if we are in a simulation, we are not because this is our reality. Reality is just a manifestaion of the information around you, so untill you can be on the outside of the simulation you can't incorpate that into your reality.
Preception is Reality .