PlanarGraphQ
PlanarGraphQ[g] yields True if graph g can be drawn in a plane without edge crossings, and False otherwise.
Examples
Test for planarity:
PlanarGraphQ[CompleteGraph[4]]
(* True - K4 is planar *)
PlanarGraphQ[CompleteGraph[5]]
(* False - K5 is not planar *)Grid graphs are planar:
PlanarGraphQ[GridGraph[{10, 10}]]
(* True *)Please visit the official Wolfram Language Reference for more details.