Why do we use the indefinite article in the expression "have a good time"? Time is an uncountable noun, and we never say "what a beautiful weather!", but "what beautiful weather it is!"
Could anyone explain it to me?
Time is uncountable when it describes the abstract concept, but it is countable when used in contexts such as this. We can have a good time, but we can also speak of good times and bad times. A good time makes a generic reference. That is, in the words of the ‘Longman Student Grammar of Spoken and Written English, it
Although time can be a mass noun, in this case it isn't. It means occasion or period, both of which are countable.
time sense 2:
And there's Dickens: