Upvote:2
Yes, of course you can, as long as you have the proper visa (which, for some people, would be no visa at all).
The specific visa you need to apply for depends on your nationality, the length and purpose of your intended stay, whether you are resident in a different EU country, and whether your wife is exercising her EU rights of freedom of movement. This will be true if she is a citizen of an EU country other than the UK, or if she is a UK citizen living in a different EU country. In that case, you can apply for an EEA family permit, which is free of charge.
If your wife is a UK citizen who either resides in the UK or outside the EU, then you will have to apply for a visa under UK law rather than European law.