This can be done very easily.
First of all what is a bell –to hear the sound of a bell we need a speaker and an audio amplifier. So what task microcontroller do is to generate wave of particular frequency.
So what we need ?We need to write a program to generate pulse trains of a particular frequency. This can be found in any 8051 book. Now the thing is what frequency this will generate ,the answer is the frequency that has to be generated must be of audible range(20HZ to 20KHZ).Now after wave or pulse train is generated(in audible frequency range) by the microcontroller then that is fed to the audio amplifier IC and then the output of the audio amplifier IC is fed to speaker.
Now there is another way of doing this project. We can use IC555 to generate tones of different frequency by just changing the resistor and capacitor values. So we will use IC 555 as a astable multivivbrator mode and the then after the generation of the tone pulse trains they are fed to the IC 741 (which is an OPAMP IC) for signal amplification then again fed to speaker(8Ohm) and we will hear a sound.
Now question is why we are using IC555 in the mode of astable multivibrator. Because we know that only the astable multivibrator is capable generating continous pulse as it has two stats and each state is not a stable one.
Now there is another method for generating pulse with audio frequency is that just use a IC 324 (an opamp IC) and configure it to generate audiable frequency wave in that way waves can be generated and connection to speaker is the same as before.