Is there an easy way to make two flat objects coplanar?
Define a plane by a point on the plane and its normal.
For example sake using 4 coordinates of plane as 4 points that make up the plane.
&gt;&gt;&gt; ob = C.object
&gt;&gt;&gt; ob
bpy.data.objects['Plane']

&gt;&gt;&gt; mw = ob.matrix_world
&gt;&gt;&gt; points = [mw @ v.co for v in ob.data.vertices]

Only need 3 points, $(a, b, c)$ to define a plane. All of these distinct points is on the plane. The normal is the cross product of any two non parallel vectors on the plane (b - a).cross(c - a)
The global plane coordinate and normal of example plane.
&gt;&gt;&gt; plane_co = points[0]
&gt;&gt;&gt; v1 = points[1] - plane_co
&gt;&gt;&gt; v2 = points[2] - plane_co
&gt;&gt;&gt; plane_no = (v1.cross(v2)).normalized()

Hence to make any plane aligned with another plane can align their two normals. To get the quaternion rotation required to rotate one vector to align with another.
&gt;&gt;&gt; q = plane_no.rotation_difference(plane_no_2)

Matrix math to translate, rotate, scale with respect to a pivot point in Object mode
Finally there is a helper method mathutils.geometry.distance_point_to_plane
&gt;&gt;&gt; geometry.distance_point_to_plane(
distance_point_to_plane(pt, plane_co, plane_no)
.. function:: distance_point_to_plane(pt, plane_co, plane_no)
Returns the signed distance between a point and a plane    (negative when below the normal).
:arg pt: Point
:type pt: :class:`mathutils.Vector`
:arg plane_co: A point on the plane
:type plane_co: :class:`mathutils.Vector`
:arg plane_no: The direction the plane is facing
:type plane_no: :class:`mathutils.Vector`
:rtype: float

which will give how far along the plane normal a point on another plane is to current plane.
Have used this in determining coplanar faces here https://blender.stackexchange.com/a/53976/15543.