Proof. First, suppose that
$X$ is locally connected and that
$U$ is an open set of
$X$ Let
$p \in C$ where
$C$ is a component of
$U$ Since
$X$ is locally connected there is an open
connected set, say
$V$ with
$p \in V \subset U$ Since
$C$ is a component of
$U$ it must be that
$V \subset C$ Hence,
$C$ is open. For the
converse, suppose that each component of each open set is open. Let
$p \in X$ Let
$U$ be an open set containing
$p$ Let
$C$ be the component of
$U$ which
contains $p$ Then
$C$ is open and connected, so
$X$ is locally connected.

As a corollary, we have that the components of a locally connected space are both open and closed.