Disjoint union is the coproduct in the category of finite graphs, so connected graphs are precisely the noninitial objects in this category that can not be expressed as a coproduct of two nonempty subobjects. See the entry on connected object in the nlab.
If you want to read more about arguments that intertwine classical results in graphs theory with category theory I suggest the book "Graphs and homomorphisms" by J. Nesetril.

