Here are my questions:
- Does it matter when to use each of the two?
- Is there any difference in the literal translation of them?
- Are both of them correct when you speak and write?
Both have the same meaning.
Wie spät ist es?
Literally translated: "How late is it?" This phrase is more common.
Wieviel Uhr ist es?
Literally translated: "What time is it?"
"Wie viel Uhr ist es?" is colloquial as opposed to "Wie spät ist es?" which is more formal. "Wie viel Uhr ist es?" is also used only in certain areas of Germany especially in the south. The meaning however is exact the same.
I had a look at usage and (unless I am v mistaken) "Wie viel Uhr" hardly figures in usage. I never thought it was more "formal"... but I defer on that.