Summer, although it can be fun to go at other times as well. St. John's Eve ("Sankt Hans") is June 23. That night there are bonfires all across Denmark, with witch effigies on top. The fire sends the witch flying off to Bloksbjerg in Germany. People gather around the bonfires to sing and celebrate. July and August are warmer and sometimes drier. Christmas is fun too.
Top three attractions that I personally would recommend are the National Museum of Denmark, Kronborg Castle in Elsinore (the setting for Hamlet), and boat tours of Copenhagen Harbor (which is clean enough to swim in). Most people also visit Tivoli Gardens, the amusement park that gave Walt Disney the idea for Disneyland, and there are numerous other great places to go.