Can you connect a computer monitor to a tv?

No, however you can connect a computer to the tv.

Many new computers have either a DVI or an HDMI display port. These are the digital replacements to the 15 pin VGA connector that has been around for many years.
Almost all new televisions have an HDMI input. If the computer has an HDMI output, then a simple HDMI cable should carry both video and audio to the television.

If the computer has a DVI output, a DVI to HDMI cable can be used because the video element of HDMI is identical to the DVI signal. Unfortunately, DVI does not support audio so a separate cable will be needed for the audio signal. Because of the lack of audio support on DVI, most televisions have at least one HDMI input that has a separate analog audio input that is linked to the HDMI port.

For computers without a DVI or HDMI port, USB based display ports can be purchased at a relatively low cost and will provide a digital video output.

Finally, there are a number of televisions that have VGA inputs and can accept VGA directly. Others have a set of five RCA or phono sockets normally marked as R, G, B, H, V. The five connectors will normally handle a VGA signal with the right adaptor cable.

Some computers are fitted with either a composite or S-video connector. Although these can connect into most televisions, the quality is very poor compared to any other connections above. Try to avoid either of these connections if possible.