Your equation can be rewritten as

$$\frac{x^{3}-1}{x-1} = y^{n}.$$

As Gerhard Paseman commented above, the Diophantine equation

$$ \frac{x^{n} − 1}{x-1} = y^{q} \quad x > 1, \quad y>1, \quad n>2 \quad q \geq 2 \quad \mbox{ (*) }$$

was the subject matter of a couple of papers of T. Nagell from the 1920's. Some twenty-odd years later, W. Ljunggren clarified some points in Nagell’s arguments and completed the proof of the following result.

**Theorem.** Apart from the solutions

$$\frac{3^{5}-1}{3-1}=11^{2}, \quad \frac{7^{4}-1}{7-1}=20^{2}, \quad \frac{18^{3}-1}{18-1} = 7^{3},$$

the equation in $(*)$ has no other solution $(x, y, n, q)$ if either one of the following conditions is satisfied:

 1. $q = 2$,     
 2. $3$ divides $n$,
 3. $4$ divides $n$,
 4. $q =    3$ and $n$ is not congruent with $5$ modulo $6$.

Clearly enough, this theorem implies that there are only two solutions to the equation you are considering: $(x=1, y=3, n=1)$ and $(x=18, y=7, n=3)$.