Does an object at the center of the Earth have potential energy? 
"Potential energy: The energy possessed by a body by virtue of its position relative to others, stresses within itself, electric charge, and other factors." 

in other words, I think that potential energy is caused by gravity because of its position and distance from the surface of the earth, so will you have no potential energy if you were at the core? Or will you have the same potential energy as the earth due to the gravitational pull of the sun?
 A: In Newtonian physics, only differences of potential energy are meaningful. But the world is not Newtonian.
In relativistic theories, potential energy is well-defined and is zero at infinite separation. How do we know? Because otherwise the nonzero potential energy between every pair of masses in the universe would create huge unobserved spacetime curvature.
If you complain that there is no gravitational potential energy in General Relativity, then work in the post-Newtonian approximation where there is (and it’s negative, and it gravitates negatively). The dynamics of the solar system don’t work out unless the gravitational potential energy goes to zero at infinite separation.
So my answer is that the potential energy of an object at the center of the Earth is negative, absolutely.
The actual value of potential energy at the centre of earth is $$U=-\frac{3GMm}{2R},$$ where $M$ is the mass of the Earth, $m$ is the mass of the object at the center of the Earth, and $R$ is the radius of the Earth. This comes from the more general expression
$$U=-\frac{GMm}{2R}\left(3-\frac{r^2}{R^2}\right)$$
for when $m$ is inside the Earth at $r<R$. (This assumes uniform density.)
You can check that this is the correct potential energy inside the Earth because at the surface it becomes $-GMm/R$ (matching the outside potential energy $-GMm/r$ for $r>R$) and its negative gradient gives the correct linear-with-$r$ force inside, which is determined by the mass within radius $r$. (The mass further out does not contribute to the gravitational force, by the Shell Theorem.)
A: In many cases, rather than asking if energy "exists", it is better to ask what the difference in energy is between two configurations.
An object at the center of the earth would have less potential energy than it would some distance away (like on the surface).  You could even calculate the difference for a given mass.  Further, you could say that the energy of the earth-object system is minimized at this location, or that you can't extract any energy from the potential of the object at this position.
But I wouldn't feel comfortable saying that the position didn't have potential energy.  Rather that it was a certain amount less there than it is in some other location.
A: The question "what is the potential energy difference of item X between location A and location B" is purely and exactly asking "how much work would be required to move X from A to B, with no other change?" So to answer the question about something at the centre of Earth (location A) first we need to say where location B is. I guess that the question has in mind that location B is far away from Earth. So then the question is, would it require work to move something from the centre of the Earth to a long way away? Now that we have asked the question more clearly, I think the answer is not hard to see. It would require work. As soon as the object is lifted a little away from the centre, the Earth will attract it back, and this will happen all the way on the journey to B, so work is required all the way. See answer by G. Smith for mathematical details and a quantitative statement.
A: In addition to the answers already given, it's worth noting that we are only discussing gravitational potential energy here. As you mentioned, potential energy can also be due to internal stresses, chemical or electrical potential, just to name a few.
A: Energy is always dealt in changes. In your extraction "by virtue of it's position relative to the other" it also means that energy is changed(lost or gained) when an object shifts it's orientation relative to the others. In the center of the earth the GRAVITATIONAL potential energy is at the lowest but whether it's zero or a million is up to you. What ever value you assign wouldn't change your calculations because you are calculating a change.
In my studies it's common practice to assign a 'zero potential level' beforehand. That is if you are not using calculus. Consider this. You throw a ball up from a negligible height from the surface of the earth. And if you assign the value of zero to the energy at the initial point then when it's at a height of h from the starting point then it has gained a potential of mgh (again roughly)(let m be the mass of the ball.) But when you assign a value to the initial position then you will get a different value for the potential at an h height but the difference will still be the same. That is what actually counts. 
A: In Newtonian gravity the  potential energy is given as
$U=-GMm/r$

for objects near the earth the acceleration of gravity g can be considered to be approximately constant and the expression for potential energy relative to the Earth's surface becomes

$U=mgh$

where h is the height above the surface and g is the surface value of the acceleration of gravity.

So one has to be clear of the frame of reference, to which potential energy is defined.
You ask:

I think that potential energy is caused by gravity because of its position and distance from the surface of the earth, so will you have no potential energy if you were at the core?

This is true when r, the radius from the center of mass , is smaller than R the radius of earth. It is not true  when r is smaller than R.
There exists the shell theorem, which proves that there is no gravitational potential within a mass shell:

So it is only the mass of the sphere smaller than r that affects the acceleration: and the  g in $U=mgh$ is effectively variable, becoming zero at the center.
Consider a tube going through a diameter of the earth and a person  from the surface falls. What is the  potential energy as a function of r? Lets see the acceleration on the falling mass:

Your initial acceleration would be the surface acceleration of gravity



but the acceleration would be progressively smaller as you approached the center. Your weight would be zero as you flew through the center of the Earth.


$g_eff$ is zero at the centero of the earth and thus the potential energy at the center is zero,
As the mass passes through the center there is zero mass there to have an effective attraction that will create potential energy, so at the center the potential energy is zero. It  has become kinetic energy that will bring the particle to the surface on the other side, in the oscillation calculated in the link given.
