If the word أَمْسِ is without ال it will be مبني علی الكسر i.e أَمْسِ.
If it comes with ال it will be معرب.
As far as the difference in meaning is concerned, this word breaks all rules of معرفة-نكرة. It can be said regarding it:
إِذا عُرِّفَ نُكِّرَ وَإِذَا نُكِّرَ عُرِّفَ
When it is made definite it gives a specific meaning, and when it is made indefinite it gives a general meaning.
This means when it is معرفة with ال it will be translated as yesterday in a more general sense i.e previously; and when it is نكرة without ال it will give the meaning of yesterday more specifically i.e. the day before today. Look at the following texts:
عَنْ جُوَيْرِيَةَ بِنْتِ الحَارِثِ رَضِيَ اللَّهُ عَنْهَا، أَنَّ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، دَخَلَ عَلَيْهَا يَوْمَ الجُمُعَةِ وَهِيَ صَائِمَةٌ، فَقَالَ: «أَصُمْتِ أَمْسِ؟»
The Prophet (ﷺ) visited her (Juwairiya) on a Friday and she was fasting. He asked her, "Did you fast yesterday (i.e. the day before today)?”
﴿فَجَعَلْنَاهَا حَصِيدًا كَأَنْ لَمْ تَغْنَ بِالْأَمْسِ﴾
And We make it like a clean-mown harvest, as if it had not flourished yesterday (i.e. prior to that / previously)
However, it is worth noting that this rule is flexible and الأمس is also used in the meaning of the yesterday i.e. the day before the present day.