The format of messages occasionally needs to change. This is done in a backward-compatible way by exchanging versions in version messages and communicating in the "language" of the client with the lowest version. Through this mechanism, clients running version 0.1 should still be able to talk to the latest clients.
Blocks and transactions are special. When these formats are updated, nodes can't modify old messages to use the new format because this breaks the crypto. So version 2 nodes have to store and communicate both version 1 and version 2 blocks, and special version numbers are necessary to distinguish them.
Block/transaction versions other than 1 are not accepted.
In version messages, use the same version as the client version that you're trying to be compatible with.