The cake doesn't have to be cooled down completely before frosting it but make sure you allow the cake to cool down at least some before frosting the cake.
If you apply the frosting on the cake while it's still hot the frosting can melt which would make the cake not as good and you'd have to apply some more frosting.
I always wait until the cake gets to room temperature before frosting the cake and never had an issue with melting frosting.
A cake should cool for 30 minutes to 60 minutes before frosting the cake as the cake even being warm can sometimes melt the frosting.