Dialog size in messages
It is not possible to order messages by size on your phone. On your computer, it may be doable with a little Finder footwork. 

However, since it appears that you are running iOS 8, I suggest that you select to only keep messages for 30 days. If you open the Settings.app, navigate to Messages, then "Keep Messages" there are three options there with the shortest being 30 days. You may find this allows a good enough balance of your space. 

Also, the messages are automatically sorted by date, so you could manually delete the oldest threads which are automatically taking up space while not being used much. In addition, if there are any threads that you know (some use texts in a similar style to social media or iCloud photos) have many pictures, those should be the first to go.