I would definitely say that the term TV is informal (while television is formal), however I have found "TV" in some formal compositions.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
It is somewhat more informal than television, but not very much so; while I'd certainly prefer television in most written texts, I'd not be shocked at reading TV either, perhaps not even in a scientific research paper. Others might disagree. In official documents, however, I strongly recommend television.