If I seem tired, can I say: "I haven't slept last night"? If not, why have I been told that we use present perfect for actions that have present effects?
Why have I been told that we use present perfect for actions that have present effects? Because the present perfect is indeed an appropriate way to talk about a past action whose effects continue into the present. Examples:
However, as soon as you use an expression of finished time, then the past simple must be used:
The past simple is needed also when the finished time is not explicitly stated but implied:
"Rules" such as the one discussed here can be quite helpful to get English language learners started on the differences between English tenses, but good teachers will make it clear from the outset that actual usage is very much more complex.
I would be happier with "I am tired because I haven't slept for 24 hours", since the implication is that the period without sleep stretches up to the present.
Once you are in the following day and you want to qualify your statement with "last night", it becomes a description of a cause from a past period, so the natural form is "I am tired because I didn't sleep last night" or perhaps "I am tired because I wasn't able to sleep last night".
Move the whole phrase back a stage and you can use a (past) perfect: "I was tired because I hadn't slept the previous night".