Now that this has gotten so many responses, I'd like to give my refined thought.
It doesn't really matter. It should come down to what you think is best. I have some pretty awesome 1 minute songs on my phone from rappers I like.
3 to 4 minutes is a fantastic go to. But you can make longer songs interesting.
Some people just like long songs for ambiance reasons (Like pink floyds shine on you)
It's varies from genre to genre, But I believe all genre's can have 1 to 7 minute tracks
A good song to take a look at is Throw That by slaughterhouse. You may find sophomoric. After all, it's about throwing your dick on girls. But the song has a great example of different things you can do in a beat.
It's got the intro, then the chorus to grab them right away. The chorus itself has two different parts to it, one where it's eminem singing, and one where the drum adds a bunch of reverb and he sings in a lower voice, then back to the first part.
During Royce's verse, you hear Eminem come in once or twice and a little bit of BG vocals to give it flavor
After Royce's verse, the Pre-Chorus is introduced, which is a new element to the song and again, adds flavor to it.
Then the chorus hits again, another verse with more BG stuff. Then prechorus
Then an entire new part is introduced, where Eminem sings a bridge with a new synth. Then a verse, and then the final part. Its the same chorus, but with pretty much only piano and vocals playing, and Eminem adding extra layers to harmonize the chorus.
The song is only about 4 minutes long, but those are all great examples of keeping a song interesting, and it could've been 6 minutes with that bag of tricks. I don't even like the subject matter all that much in the song, it gets a little old. But the beat, the variety and the change-ups make it so interesting to listen to.
It could be the same with any Genre. Something as simple as dropping out or adding instruments keeps it interesting. Bridges and Pre-Choruses and new parts also help.
However, I will say that if you plan to release music professionally, you shouldn't get in the habit of making 1 to 2 minute songs when you're charging them for the same price of a 3 minute song. Somebody may look at it and go WELL WHAT THE HELL.