How can I translate & rotate an object to match a pair of xyz coordinates?
How do I construct a transformation matrix from 3 vertices? gives a generic technique to convert a triangle into a transformation matrix.  You could use this to pick a transform matrix to apply to a generic cylinder.

If you don't like the choice of X as the primary axis, you can rearrange the arguments to Matrix([a2,b2,c2]) , although some of those orderings will be left-handed instead of right-handed, requiring you to reverse one of them.  For example Matrix([b2,a2,-c2]).

Also, since your use case only includes 2 points, you'll need to pick a 3rd in order to construct the matrix.  If you know something about the direction of the pairs of coordinates and can guarantee a 3rd coordinate that will always be non-colinear, use that.  Otherwise, you'll have to add a little bit of logic that checks for things being "too colinear" and using a different 3rd axis.

If you want your cylinder to stretch with the distance between the points, you can use non-normalized a instead of a2.

If this narrative is a little too vague, go ahead and request some refinements in the comments.