available() gives the number of bytes (characters) available for reading from the serial port
Serial.read() inherits from the Stream utility class. The specification states that it returns as an
int the first byte of incoming serial data available or
-1 if no data is available.
So if you don't need to know how many bytes are pending, you can use
read() and test against
-1 before proceeding and if you need to wait (why would be another discussion) for a given number of bytes before doing something then
available() is your friend and there for you.
I don't use
available() and go for
read() right away (or
peek()) if I'm listening to the Serial port because it's faster (since available needs to do some maths on the circular buffer pointers with a modulo to calculate how many bytes are pending).
I think you see the construct with available() being tested as non null in most demo script because it's easier to explain to beginners: "if a byte is available in the buffer, then deal with it"... And then everyone started using it...