Cycling is a good excercise, but it does not use all the leg muscles equally. Brisk walking is probably better for initial rehab.
The advantage of cycling over walking is that is is so much more fun and useful, so you tend to do it more often. You can use a bike to get to work and do all your local errands, saving time and money.
A race bike is good for speed and fun. If you are considering using the bike for commuting or all-weather riding, then you need something a bit more practical. Most riders have a clutch of bikes for different uses.