If you just need to set this up at design time, you can click the button in the upper-left corner of the Viewport that says “Perspective” to change the view to an “Orthographic View.” This will give you a 2D-view and a grid so you can be sure everything is perfectly aligned.

If you want this at runtime, you have to do this:
Pick a plane in which you want to align them. For example, YZ plane, it’s normal being the X axis. Let’s say that Y is horizontal and Z is vertical.
To know where to place the mesh, get the position of the mesh on the left on the Y axis , add to that half of its bounds on the Y axis (if it’s the first, just set a limit point).
Then add to that half of the bounds (on Y axis) of the mesh that you want to place. Now you have the horizontal position.
For the vertical, just take the coordonates of the upper limit (on Z axis) and add half of the vertical bounds of the current mesh (on Z axis). Now you have the vertical position.
This way you get the location of the current mesh to place.
Remember that, and redo this for the next mesh.

Of course, this assumes that all the pivots are in the center of the meshes. If not, you have to adjust the bounds calculations accordingly.