High profile sporting events including the World Cup are also said to have helped increase sales, particularly of drinks and televisions.
Total retail sales rose by 2.7% in June compared to the same month the previous year with food rising 4.8% and non-food increasing by 1.0%.
The total sales rise in June, which increases further to 3.2% when adjusted for deflation, is the highest monthly growth since January 2014.
The Scottish Retail Sales Monitor for June 2018, produced jointly by the Scottish Retail Council (SRC) and KPMG, also shows the year-on-year percentage growth in Scotland for the month is higher than the overall UK figure of 2.3%.
Ewan MacDonald-Russell, SRC head of policy and external affairs, said: “Scots, perhaps unused to one of the hottest Junes in a century, sought out drinks, fans, barbecues and paddling pools to cool off and enjoy the sunshine.
“Food sales continued their strong performance in 2018 with growth of 4.8%. In particular this month consumers were keen on picnic and barbecue food, reflecting the unusual opportunity to consistently eat outside.
“There were also strong drinks sales due both to the weather, but also as a result of the series of sporting events on television, not least the World Cup.
“It was heartening to see a second month of non-food sales growth after a difficult start to the year.
“Outdoor furniture, sunblock and skincare products, and televisions all saw very good sales.
“However, even in these conditions fashion and footwear items were often significantly reduced to encourage sales, indicating consumers are still working within tight household budgets.”
He warned the retail industry still faces challenges and questioned if the growth would continue after summer.
Paul Martin, KPMG UK head of retail, added: “Despite the uptick, the woes of the high street continued in June, with sales not necessarily guaranteeing profit.
“June’s warmer weather may have provided some welcome relief, but we know it’s not likely to last.
“As temperatures cool, retailers must look to other ways to maintain growth in a sector undergoing significant change.”