Yes, William Shakespeare wrote Sonnet 18 ("Shall I compare thee to a summer's day?"). It is one of the 154 sonnets published in the 1609 quarto Shakespeare's Sonnets and is universally attributed to him.
The claim that Henry Constable or George Chapman wrote it is incorrect. While authorship debates exist for some Elizabethan poems, Sonnet 18's place in the Shakespeare sequence, its stylistic fingerprints (imagery, rhetorical structure, thematic links to surrounding sonnets), and the 1609 publication under Shakespeare's name make the attribution secure.
Any source denying Shakespeare's authorship of Sonnet 18 is unreliable.