<em>The dictionary says it was </em><em>Thomas Edison</em><em> who put hello into common usage. He urged the people who used his phone to say "hello" when answering. His rival, Alexander Graham Bell, thought the better word was "ahoy"</em>
greeting, 1862, American English (first recorded reference is to speech of a Kansas Indian), originally to attract attention (15c.), probably a variant of Middle English hy, hey (late 15c.) also an exclamation to call attention. Extended form hiya attested from 1940.
Best time is probably in the morning or evening. Usually the sun is at its hottest mid-day, but if you go in the evening it is still quite hot but not as much