You can leave your children or grandchildren any portion of your estate that you choose, but can you make them follow a certain religion in order to get it?
The short answer is, generally, no. While the area is not black and white, in Canada, most courts have ruled that you cannot require a beneficiary to follow a particular faith or marry within a particular faith in order to inherit. There are ways around this, but it can be very complicated. If you truly wish to put such restrictions in your will, you would be well advised to see a lawyer in order to attempt to avoid a costly lawsuit after the fact.