The perfect song duration is 3:31
J/k ofcourse, but most of my songs are around that mark. I guess that's just a result of the way I work and the type of music I like.
I have a rule of thumb that I want one musical idea plus one per minute of music. So, for three minutes of music I want at least four musical ideas. This is just a silly rule of course, but it's a guideline that works for me. A "musical idea" could be a new melody, a new chord sequence, or a drastic change in arrangement (so simply adding some extra drums to a part wouldn't count).
It also helps me to think about song structure. For example, a song could consist of an intro, verse, chorus, verse, chorus, bridge, chorus. That's four musical ideas right there, so this would be a good structure for a three minute tune. I would change the arrangement for each repeating section, so that the song builds up to some sort of climax and the listerener doesn't get bored.
Of course, these "rules" aren't set in stone, but simply considering them could give you some ideas on how to improve your songwriting.