Yes.
First $f$ is surjective. Indeed, let $y \in Y$. $\frac{y}{||y||} \in B_Y = f(B_X)$ hence there is $x \in B_X$ s.t $f(x)=\frac{y}{||y||}$ and so $f(||y||x)=y$ by linearity. We conclude that $f$ is surjective and hence bijective (we already know it is injective by assumption)
Because of the facts that $B_Y = f(B_X)$ and that $f$ is bijective, we have $B_X=f^{-1}(B_Y)$ thus $||f^{-1}(y)|| \leq ||y||$ for all $y \in Y$. (*)
Now let $y \in Y$. There exists $x \in X$ s.t $y=f(x)$.
Then $||f^{-1}(y)|| = ||f^{-1}( f(x) )|| = ||x|| \geq ||f(x)|| = ||y||$ (**)
Using (*) and (**) we deduce that $||f^{-1}(y)||=||y||$ for all $y \in Y$.
Finally, for all $x \in X$ we have: $||x||=||f^{-1}(f(x))|| = ||f(x)||$ so $f$ is an isometry.