Well, it is usually used to confirm that a development environment is working. If i need to check if a LAMP stack is working I usually start with:
<?php
echo “Hello World”;
echo 4 *16;
?>
According to Wikipedia…
“While small test programs existed since the development of programmable computers, the tradition of using the phrase “Hello world!” as a test message was influenced by an example program in the seminal book The C Programming Language. The example program from that book prints “hello, world” (without capital letters or exclamation mark), and was inherited from a 1974 Bell Laboratories internal memorandum by Brian Kernighan, Programming in C: A Tutorial, which contains the first known version”