The tradition of celebrating this date began 1916 at the Stockholm Olympic Stadium, in honour of the election of King Gustav Vasa in 1523, as this was considered the foundation of modern Sweden.
Some question the validity of this as a national holiday, as it was not observed as a holiday until decades later. However this event does signify the end of the Danish-ruled Kalmar Union, so in a sense it is a marking of Swedish independence, though the event occurred so long ago that it does not have as strong of a presence in the social consciousness as does, for example, Norway's Syttende Mai (17 May).
In 2005 it became an official Swedish public holiday, replacing Whit Monday. This change led to fewer days off from work (more working-days) as 6 June will periodically fall on the weekend, unlike Whit Monday, which was always celebrated on a Monday. This has in turn led to complaints from some Swedish unions.
Related events
The events of 1523 and 1809 are generally regarded as the most important; the first reestablishing Sweden as an independent country after the Kalmar union, the other establishing an Instrument of Government that was used until the 1970s.
Crown Princess Victoria at a National Day celebration in 2006 - wikipedia.com