To add to what Xneb was saying, it depends on your meaning. If - at 4AM - you say something like "Jeg skal ud at feste i nat" ("I'm going partying tonight"), you mean the following night. But if you say "Jeg sov dårligt i nat" ("I slept badly last night") you're talking about last night. If you want to clarify that you meant last night, use the word "her" as in "her i nat" :-)
wataya, it depends on the verb. If one says, "I slept badly last night", in Danish it would be "Jeg sov dårligt i nat". If one says "I have to work tonight", in Danish it would be "Jeg skal arbejde i aften". In my experience, one doesn't refer to the coming night as "i nat", but as "i aften". However, I'm not a native of Denmark, so a comment from a Dane would be appreciated. CORRECTION: Sorry, of course one can use "i nat" for the previous night AND the coming night. I recall a song with the words, "skibet skal sejle i nat", meaning "the ship will sail tonight". The conclusion being, "i nat" can be used for the previous night and the coming night, depending on the verb.