Matrix of a graph and computational complexity
Let $B_1 = I + A$. Then $B_1(i,j) = 1$ iff $d(i,j) \leq 1$, where $d(i,j)$ is the distance between $i$ and $j$ in the graph. Now $B_2 = B_1^2$, and so by definition,
$$
(B_2)_{ij} = \bigvee_k (B_1)_{ik} \land (B_1)_{kj}.
$$
In words, $(B_2)_{ij} = 1$ iff there exists a vertex $k$ such that $(B_1)_{ik} = (B_1)_{kj} = 1$, i.e. $d(i,k) \leq 1$ and $d(k,j) \leq 1$.

We can now prove that $(B_2)_{ij} = 1$ iff $d(i,j) \leq 2$. Indeed, if $(B_2)_{ij} = 1$ then there exists $k$ such that $d(i,k),d(k,j) \leq 1$, and so $d(i,j) \leq d(i,k) + d(k,j) \leq 2$. Conversely, suppose that $d(i,j) \leq 2$. We consider two cases. If $d(i,j) \leq 1$ then $k := j$ satisfies $d(i,k) \leq 1$ and $d(k,j) = 0 \leq 1$, and so $(B_2)_{ij} = 1$. If $d(i,j) = 2$, choose a shortest path from $i$ to $j$, and let $k$ be the vertex in the middle. Then $d(i,k) = d(k,j) = 1$. In both cases, $(B_2)_{ij} = 1$.

You cannot compute $C_2$ faster than $n^2$, simply because it contains $n^2$ many entries. The asymptotically fastest way known to compute $C_2$ is by squaring $I + A$ (using the usual matrix multiplication), zeroing the diagonal, and replacing each entry larger than 1 with 1. This takes time $O(n^\omega)$, where $\omega$ is the matrix multiplication constant.