Create a wrapper RectTransform around each bubble which takes up the full width, with a HorizontalLayoutGroup component. Set the Child Alignment on the left-side messages to Middle Left, and on the right-side messages to Middle Right. So your hierarchy looks like this
|-ChatMessages (VerticalLayoutGroup, Child Alignment = Lower Center)
|----LeftMessage (HorizontalLayoutGroup, Child Aligment = Middle Left)
|--------Message (Text, Image, Whatever)
|----RightMessage (HorizontalLayoutGroup, Child Aligment = Middle Right)
|--------Message (Text, Image, Whatever)
|----LeftMessage (HorizontalLayoutGroup, Child Aligment = Middle Left)
|--------Message (Text, Image, Whatever)
|----RightMessage (HorizontalLayoutGroup, Child Alignment = Middle Right)
|--------Message (Text, Image, Whatever)