Suppose $X\to Y$ is a morphism between varieties with all fibers isomorphic to $\mathbf{P}^n$, is $X$ a projective bundle over $Y$, i.e. $X=\mathbf{P}(E)$ for some vector bundle over $Y$?

7$\begingroup$ Such an $X$ is called a SeveriBrauer scheme over $Y$; the obstruction for $X$ to be a projective bundle lies in the Brauer group of $Y$. See for instance this Bourbaki lecture by Grothendieck. $\endgroup$ – abx Aug 7 '15 at 13:10
No that is not true, and I am confident somebody has written the following example previously on MO. Let $\mathbb{A}^2$ have coordinates $s$ and $t$. Let $Y\subset \mathbb{A}^2$ be the singular plane curve with defining equation $$f(s,t) = t^2s^2(1s) = 0.$$ Let $u$ be a coordinate on $\mathbb{A}^1$. The normalization of $Y$ is $$\nu:\mathbb{A}^1 \to Y, \ \nu(u) = (1u^2,(1u^2)u).$$ Let $V\subset \mathbb{A}^1$ be the open complement of the closed point $p$ where $u=1$. Let $X$ be $V\times \mathbb{P}^n$. Denote by $$\text{pr}_V:V \times \mathbb{P}^n\to V,$$ the usual projection. Then one counterexample is $\pi = \nu\circ \text{pr}_V$.
Edit. One reference for this problem is Exercise II.7.10 of Hartshorne's "Algebraic Geometry". If $\pi$ is a proper, flat morphism $\pi$ as in the question, then Ariyan's answer is perfectly correct and gives étale local triviality. If, further, $Y$ is Noetherian and regular (the hypothesis in Exercise II.7.10), then generic triviality of $\pi$ (i.e., the OP's hypothesis at the generic point of $Y$) implies Zariski local triviality of $\pi$. There should be an easy direct argument for this, but this certainly follows from the known cases of the GrothendieckSerre conjecture (there is a direct argument after all, see the hint in that exercise). Finally, Exercise II.7.10 implies that $X$ is isomorphic to $\mathbb{P}(E)$.
No, as Jason Starr explains. (I had misread the question before. Let me just give the OP a positive result in this direction, not completely unrelated to the question.)
Let $X\to Y$ be a proper flat (locally finitely presented) morphism of schemes such that all geometric fibres are isomorphic to projective $n$space. (This implies that $X\to Y$ is smooth.)
Let $I:= Isom_Y(X,\mathbb P^n_Y)\to Y$ be the Isomscheme of $X$ with projective $n$space over $Y$. As the fibres of $X\to Y$ are projective spaces, for all $y$ in $Y$, the vector space $\mathrm{H}^1(X_y, T_{X_y}) =0$. Here $T_{X_y}$ is the tangent bundle of $X_y$ (over the residue field of $y$ in $Y$). Now, note that if $H^1$ of the tangent bundle vanishes, the Isomschemes of $X$ are unobstructed. (Here we use flatness of $X\to Y$.)
Thus, $I\to Y$ is formally smooth. As it is locally finitely presented (by assumption), we conclude that $I\to Y$ is smooth. By assumption on $X\to Y$ it is surjective (all fibres are isomorphic to $\mathbb P^n$).
Now, note that $X_I = \mathbb P^n_I$ (because $I(I)$ contains the identity morphism). In other words, $X$ is isomorphic to $\mathbb P^n_Y$ over $I$.
Since $I$ is smooth surjective, we conclude that $X$ is isomorphic to $\mathbb P^n_Y$, locally for the smooth topology on $Y$. Therefore, $X$ is isomorphic to $\mathbb P^n_Y$ over $Y$, locally for the etale topology on $Y$ (as by a theorem of Grothendieck smooth surjective morphisms have sections, locally for the etale topology).

2$\begingroup$ The OP did not ask whether $X$ is isomorphic to $\mathbb{P}^n_Y$ locally for the etale topology on $Y$. The OP asked whether $X$ is isomorphic to $\mathbb{P}(E)$ for some vector bundle $E$ on $Y$. $\endgroup$ – Jason Starr Aug 7 '15 at 12:44

3$\begingroup$ Moreover, this answer tacitly assumes $X$ is proper (for the existence of the Isom scheme) and $Y$flat, but doesn't point out where the $Y$flatness property is being used (it is hiding in the assertion that H$^1$vanishing implies infinitesimal unobstructedness of the Isomscheme). $\endgroup$ – grghxy Aug 7 '15 at 12:47

2$\begingroup$ Also the Isom scheme argument only applies if the morphism is projective; cf. my negative answer below. $\endgroup$ – Jason Starr Aug 7 '15 at 12:48

$\begingroup$ @JasonStarr Thank you for your comment. I read the question too quickly. I will edit the "answer" accordingly. Why does the Isomscheme argument only apply if the morphism is projective? $\endgroup$ – Ariyan Javanpeykar Aug 7 '15 at 12:51

3$\begingroup$ It would be better if you point out how $Y$flatness of $X$ is being used. Curiously, properness follows from flatness: since the $Y$flat $X$ is separated and finite type over the noetherian scheme $Y$ (under whatever is the intended meaning of the alwaysvague word "variety") the geometric connectivity and properness of its fibers forces $X$ to be $Y$proper, due to the beautiful punchline of EGA III$_1$ (i.e., Cor. 5.5.2) applied to $X_R$ for the completions $R = O_{Y,y}^{\wedge}$ for all $y \in Y$. $\endgroup$ – grghxy Aug 7 '15 at 13:09