Is it legal for me to ride a bicycle on the pavement (sidewalk)?
According to the Highway Code:

Rule 64
You MUST NOT cycle on a pavement.

So the short answer is a definite no, although discretion is given for young children riding on the pavement.
This article has details the rules for cycling on things like footways, footpaths and bridlepaths.  (In short: no, no and yes - but the article is probably worth a read.)
More information about rules in other countries can be found in this question.