The first song composed by an American is generally given as "My Days Have Been So Wondrous Free", which is credited to Francis Hopkinson of Philadelphia (1737-91).
In fact, it is not that simple; in the first place, the original Americans were not the Whites but the Red Man, various tribes of which have their own music which predates the Pilgrim Fathers. In the second place, this song was actually written as a poem by the Irishman Thomas Parnell (1679-1718) who never set foot on American soil.
An early printing is held by the British Library in a collection at shelfmark G.305, wherein it is entitled "(Love and Innocence) A New SONG", in 6/8 time. Herein it is dated 1720. Christopher Scobie at the Music Enquiry Desk of the British Library clarified for us: "I have checked this score and the music in this setting of the words "My days have been so wondrous free", and they do not appear to be the same as Francis Hopkinson's. The poem was written by Thomas Parnell who lived 1679-1718, but it seems to be unclear as to who wrote the music for this version of the song. The dating of 1720 is only probable however, and could be a year or two either side of this."
Hopkinson set the original poem to music in 1759, but it was not published until 1788, in a collection of songs dedicated to George Washington, who was a personal friend.
Suggestion credit: Alexander Baron - London, England, for above 2