will I keep good SEO when redirecting from .com to .co.uk?
The domain doesn't matter so much (in the context of redirecting).
I say "so-much" because local domains can perform better in their own country, but usually it's negligible.
If the site had content originally on the .com, and you've already built up some SEO value from that content, then using a 301 redirect will tell search engines the content has permanently moved, and so any wighting for the content should transfer to the new home.
The domain is quite important :)
By switching to .co.uk you will likely filter a lot of non UK traffic from seeing your site in Google. This could be a good or bad thing depending on your perspective. Simply moving to a UK IP can have a similar though less pronounced impact.
A 301 redirect will transfer the trust you've built up eventually, but Google have deliberately made them unpredictable and random to deter spammers. A recent thread on twitter had a bunch of professional SEOs griping that their client's migrations were taking literally months to take place and the sites to return to their former glories. So if you do it, be prepared to lose search traffic for some time.
Is there a particular reason you feel you need to redirect?