(\Longleftarrow ) Suppose G = (V,E) has no odd-length cycles; we must show G is bipartite. Pick an arbitrary vertex s and run a BFS, generating layers L_0, L_1, L_2, …. Then define \begin {gather*}
L = L_0 \cup L_2 \cup L_4 \cup \dots \\
R = L_1 \cup L_3 \cup L_5 \cup \dots
\end {gather*}
We now claim that L and R are a vertex partition showing that G is bipartite, that is, every edge \{x,y\} \in E has one endpoint in L and one in R. By the single-layer-difference property of BFS, there can’t be any edges between different layers within L or R. The only possibility we have to worry about is an edge between two vertices in the same layer; we must show this can't happen.
So, suppose \{x,y\} \in E and x,y \in L_j; we will derive a contradiction. Let z be the least common ancestor of x and y in the BFS tree, and suppose z has height h above x and y. Then z \to x \to y \to z forms a cycle of length 2h + 1, which is odd—but we assumed G has no odd cycles. Therefore such an edge \{x,y\} within a single layer cannot exist, and G is indeed bipartite.